Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add provisioning templates that deploy to production in one command #8245

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dnk8n
Copy link

@dnk8n dnk8n commented Apr 10, 2020

Not sure if useful or not, thought I would share in case.

To install, create a new python virtual environment:

  • pip install ansible
  • ansible-galaxy install geerlingguy.docker
  • ansible-galaxy install geerlingguy.pip

Then enter command: ansible-playbook -i hosts.yml playbook.yml -e "fqdn=eg.dnk8n.dev host=12.34.56.78" for example

This playbook provisions a creates a passwordless sudo user (if needed), installs a Docker environment, builds/pulls images and creates networks, containers, etc.

Workflow is: Execute provisioning command, visit {{ fqdn }}, continue NodeBB installation (be sure to enter redis (the container name and by default internal hostname) instead of 127.0.0.1.

@CLAassistant
Copy link

CLAassistant commented Apr 10, 2020

CLA assistant check
All committers have signed the CLA.

@dnk8n
Copy link
Author

dnk8n commented Apr 10, 2020

This is only really applicable to Ubuntu servers at this stage. Someone else should feel free to extend to other systems.

When used against a system like AWS that:

  • has a user already configured
  • provides a private key that is located elsewhere than your default ~/.ssh/id_rsa, append --key-file /path/to/example.pem to command above. Before executing command, chmod 0600 /path/to/example.pem

@dnk8n
Copy link
Author

dnk8n commented Apr 10, 2020

Obviously need to configure DNS before running these commands. This results in automatic HTTPS thanks to caddy docker container.

…tzner Cloud), each provider has its quirks. This should work for most cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants