Scripts for provisioning a server to host Phoenix Framework app.
- A server with Debian GNU/Linux 10 (Buster) operating system.
-
Install Python
See sample instruction for macOS users
brew install asdf echo -e "\n. $(brew --prefix asdf)/asdf.sh" >> ~/.zshrc echo -e "\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash" >> ~/.zshrc asdf plugin-add python asdf install python 3.8.2 asdf global python 3.8.2 pip install --upgrade pip
-
Install Ansible
See sample instruction for macOS users
Installing Ansible using Homebrew:
pip install ansible asdf reshim python # if you use asdf-vm
-
Copy sample config:
cp vagrant/inventory inventory && cp -r vagrant/host_vars/ host_vars/
-
Update sample
inventory
andhost_vars/
(in main directory of this repo) with your own config.
Before you run the whole script, you may need to create a non-root user(s):
ansible-playbook playbook.yml -i inventory -u root -t users
ansible-playbook playbook.yml -i inventory -u admin
(cd vagrant/ && vagrant up)
ansible-playbook playbook.yml -i vagrant/inventory -u root -t users
ansible-playbook playbook.yml -i vagrant/inventory -u admin
(cd vagrant/ && vagrant halt)