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

Provision With Salt #32

Merged
merged 49 commits into from
May 13, 2013
Merged

Provision With Salt #32

merged 49 commits into from
May 13, 2013

Conversation

mlavin
Copy link
Contributor

@mlavin mlavin commented May 3, 2013

This is still a work in progress

This breaks up the duty of the Fabric script to focus on deployment and uses the masterless salt-minion for the provisioning. This addresses #11, #18, #26, #27, #28. It removes the requirement of argyle. A few things that still need to be sorted out before this is merged:

Follow up issues include:

Mark Lavin and others added 30 commits April 26, 2013 09:10
…ser and instead update the project directory permissions. See #28
@mlavin
Copy link
Contributor Author

mlavin commented May 3, 2013

Updated with documentation and updated static/media settings.

@ironfroggy
Copy link
Contributor

Determine if we want to support multiple projects/environments on a single server

Personally, I would love to, but I think if there is any considerable complexity added, we should push this to another ticket and add it in the future, and focus more on this initial salt branch.


- OS: Ubuntu 12.04 LTS
- Python: 2.7
- Database: Postgres
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What version of Postgres?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's using the default for 12.04 which is 9.1. I thought about adding all the version numbers but it would be messy (mostly for Gunicorn which isn't managed in apt).

@mlavin
Copy link
Contributor Author

mlavin commented May 4, 2013

Updated docs based on @ironfroggy's notes. Reworked the directory structure and configurations to make it easier to run multiple projects on the same server.

@mlavin
Copy link
Contributor Author

mlavin commented May 6, 2013

More offline discussion of multiple projects/environments. To support multiple environments as well as multiple projects we would need to update references which are only unique at the project level.

  • root_dir(in web.sls) and related paths (perhaps use /var/www/{{ project }}-{{ env }}/)
  • nginx_conf file name and upstream declaration
  • group_conf file name and group declaration
  • gunicorn_conf file name a program declaration
  • fabfile setup_path and deploy commands
  • settings.staging PUBLIC_ROOT

# Template of the command
fab -H <fresh-server-ip> -u <root-user> <environment> provision
# Example of provisioning 33.33.33.10 as a staging machine
fab -H 33.33.33.10 -u root staging provision
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we don't suggest adding the host address to the env.hosts first, so we can skip the -H argument on fab?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The explicit -H in the documentation is more a product of larger setups where this is needed/desired. In the case that there is more than one server in the environment (which isn't really handled right now) fab staging -u root provision would execute on all machines. However, it would fail on already provisioned machines since we don't allow root login after the initial provision. I'm fine with reordering the steps.

@mlavin
Copy link
Contributor Author

mlavin commented May 10, 2013

Added firewall support and broke out multiple environments into its own case. Is there anything remaining that should block this from being merged into master? @copelco @ironfroggy @dpoirier @Scottm-Caktus

@ironfroggy
Copy link
Contributor

🚀

mlavin added a commit that referenced this pull request May 13, 2013
@mlavin mlavin merged commit eb58b7b into master May 13, 2013
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.

4 participants