Provide a zero-touch ansible deployment to stand up bitbucket, elasticsearch and postgres in docker containers with preconfigured settings.
The scripts are purely for experimental purpose and does not follow any best practices at this stage.
The following has not been automated (yet) so will have to be preconfigured:
$ sudo yum install python-setuptools
$ sudo easy_install install pip
$ sudo yum install python-devel
Use the Dockerfiles provides in the repo.
$ cd docker/elasticsearch
docker build -t hniyaz/elasticsearch:1.0 .
$ cd docker/postgres
docker build -t hniyaz/postgres:1.0 .
Bitbucket secrets are stored in hosts_vars/vault/bitbucket-01.yml
. You can rename the bitbucket-01.yml.sample
file and update it with secrets.
Add your password to a file named .vault_pas
in the root directory.
Encrypt secrets file
$ ansible-vault encrypt host_vars/vault/bitbucket_01.yml --vault-password-file .vault_pass
View secrets
$ ansible-vault view host_vars/vault/bitbucket_01.yml --vault-password-file .vault_pass
- Replace
<host-ip>
with your remote host IP. - Replace
<host-user>
with your remote host user. You must enable passwordless sudo access.
web1 ansible_ssh_host=<host-ip>
[webservers]
web1
[dbservers]
[datacenter:children]
webservers
dbservers
[datacenter:vars]
ansible_ssh_user=<host-user>
$ ansible-playbook playbooks/bitbucket.yml --vault-password-file .vault_pass --check
$ ansible-playbook playbooks/bitbucket.yml --vault-password-file .vault_pass