Giter VIP home page Giter VIP logo

giessdenkiez-de-aws-rds-terraform's Introduction

giessdenkiez.de DB provisioning

These are some scripts and tools to setup a Postgres DB and provision the needed tables for the giessdenkiez.de project.

Prerequisites

  • Terraform (install using asdf)
  • AWS public VPC with public subnets (yes we know. Not best practice. Show us how to improve this)
  • Terraform Cloud Account

Setup

Follow the terraform AWS setup instructions to get your credentials right

git clone [email protected]:technologiestiftung/giessdenkiez-de-aws-rds-terraform.git
cd giessdenkiez-de-aws-rds-terraform/tf-rds-v2
asdf install
terraform login
terraform init
mv terraform.auto.tfvars.example terraform.auto.tfvars

Fill in all the variables in terraform.auto.tfvars.

Usage

cd tf-rds-v2
terraform apply

Now connect to your RDS DB and install Postgis using the script scripts/enable-postgis-on-aws.sql

Dump and Restore

To move your data from an existing DB to a new one do the following.

Hint!: This workflow uses docker to start a container that has psql, pg_dump and pg_restore installed. If you have a local install of these tools you should be able to skip the docker part. Be aware that it is only tested with the specific version of the tools that come with the postgres version used in the Dockerfile. (FROM postgres:11.10)

mv .env.sample .env
# edit the variables
docker compose up -d
docker ps
# get your container id
docker exec -it [CONTAINERIDHERE] /bin/zsh
#
#
# ----------------------------------------
# this is in a docker container session
cd scripts
# needs the following environment variables set
# they are in .env and loaded with docker compose
# SOURCE_HOST
# SOURCE_USER
# SOURCE_DBNAME

# will prompt for your source db password
./backup.sh
# needs the following environment variables set
# they are in .env and loaded with docker compose
# TARGET_HOST
# TARGET_USER
# TARGET_DBNAME

# will prompt for your target db pw
./restore.sh
# you might need to fiddle with postgis

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Fabian Morón Zirfas

💻 📖

Lucas Vogel

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits



A project by:

Supported by:

giessdenkiez-de-aws-rds-terraform's People

Contributors

ff6347 avatar renovate-bot avatar renovate[bot] avatar vogelino avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

giessdenkiez-de-aws-rds-terraform's Issues

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Preset package is missing a renovate-config entry (@inpyjamas)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository.

  • WARN: Using npm packages for Renovate presets is now deprecated. Please migrate to repository-based presets instead.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

asdf
development/.tool-versions
  • terraform 1.0.0
production/.tool-versions
  • terraform 1.0.0
tf-rds-v1-DEPRECATED/.tool-versions
  • terraform 0.15.1
docker-compose
docker-compose.yml
dockerfile
Dockerfile
  • postgres 14.3
terraform
development/main.tf
  • aws ~> 3.27
  • terraform-aws-modules/security-group/aws ~> 4
production/main.tf
  • aws ~> 3.27
  • terraform-aws-modules/security-group/aws ~> 4
tf-rds-v1-DEPRECATED/main.tf
  • terraform-aws-modules/rds/aws ~> 2.0
tf-rds-v1-DEPRECATED/versions.tf
  • hashicorp/terraform >= 0.13

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.