Skip to content

sebasmannem/mibifi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

General

This git repository holds everything required for the next Make it Break it Fix it session. Basic aproach for development is that you

  • create a docker image of fedora or centos
  • use that image to spin 4 docker containers
  • use ansible to
    • configure one as a repo and clone the postgresql.org repo
    • install postgres, repmgr and barman on the other three machines

Step by step

initialize ssh keys

cd docker/c7_ssh/
ssh-keygen -N '' -f ./id_rsa
cd -

Start the docker containers

docker-compose up -d

enter the ansible container

docker exec -ti mibifi_ansible_1 /bin/bash

##install defaults, like ansible

/ansible/initiate.sh

Change default config if needed

Only needed for

  • non default docker deployments, or with already running containers
  • switching between centos / fedora (default is centos) Look at
  • ansible/group_vars/all for all preconfigured variables
  • ansible/staging/inventory for all hostrelated stuff

Run playbook all.yml, or repo.yml, then repmgr.yml and then barman.yml

  • all.yml calls all the other playbooks in the correct order
  • repo.yml initializes repo container
  • repmgr.yml initializes database servers, making first server a master and the rest a standby (only one standby is tested for now)
  • barman.yml initializes database servers as barman clients and barman server as barman server
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook /ansible/all.yml -i /ansible/staging/inventory -u root --private-key /ansible//id_rsa

Cleanup

docker-compose kill && docker-compose rm

Clean and rerun only necessary

docker-compose kill && docker-compose rm -f db0{1,2} barman && docker-compose up -d && docker exec -ti mibifi_ansible_1 bash -c 'cd /ansible ; ansible-playbook all.yml'

Cleanout docker containers

  • docker-compose kill
  • docker-compose rm

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors