Skip to content

Add ability to deploy to dedicated server #44

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

Merged
merged 17 commits into from
Jan 29, 2013
Merged

Add ability to deploy to dedicated server #44

merged 17 commits into from
Jan 29, 2013

Conversation

patcon
Copy link
Contributor

@patcon patcon commented Oct 3, 2012

//cc @sylus

From #21:

  1. I would love if we adapted and integrated the https://github.com/wch/vagrant-ec2-r repo so can do a simply deployment to ec2 without needing chef server. I tested it myself and worked great with their custom cookbooks. Looking at the code it only parses the run_list and converts to json (runs chef -c .... -j dna.json) but would be great to add roles etc. This could be used for users who don't have a capable enough local computer. If we included a step by step on running on a m1.small server could help alot!

That repo is a cool effort hadn't seen! But thinking knife-solo or pocketknife might be the better approaches? (I've already used knife-solo in our Inception project, and so I lean toward that.)

@nerdcorenet
Copy link

It seems the vagrant-ec2-r project is dead:

wch/vagrant-ec2-r#1 (comment)

I am very interested in a full-featured development toolchain such as Ariadne, but without a method to deploy the same chef scripts onto a production system it is of little use to me. Our organization is not using Pantheon. Although I am sure they have a robust environment for Drupal development, I am looking for s system to deploy this type of setup elsewhere.

I'm working through the kife-solo docs at the link mentioned, but unsure of how exactly to integrate this with the cookbooks from Ariadne. Any suggestions/direction is appreciated.

@patcon
Copy link
Contributor Author

patcon commented Oct 2, 2012

Hey man, this is how I got it working with a jenkins environment that we wanted working locally with vagrant, but deployable to a dedicated server:
https://github.com/myplanetdigital/inception#stand-alone-chef-solo

Feel free to fork this and hack away on a feature branch. I'd recommend filing a pull request after the very first commit, so maybe we could talk about the approaches and I can help out.

But a word of caution: I have no illusions of this environment being secure for a dedicated server. We use it for test environments, but we don't keep any sensitive data, and we treat it as totally disposable. For us, security is something we can continuously improve with no danger, but it would be a liability to have a a production server running on it, as anyone can look at these instructions and see where its insecure -- no more security through obscurity. Sorry if I'm cautioning on things you're already aware of, but I just wanted to be open about that.

We could definitely start chipping away at some security-related additions though. Might want to start by investigating these cookbooks, as @skottler put this together for another project and he's a real ops guy :)
https://github.com/FLOSolutions/OWS-Drush-CD/blob/master/Cheffile

http://ckbk.it/COOKBOOKNAME should take you to any cookbook

@skottler
Copy link

skottler commented Oct 3, 2012

Who said my name?!

I think that Ariadne actually extends to production servers quite easily. The cookbooks are going to be the same, just with different deployment targets. +1 to @patcon's suggestion of knife-ec2. Maybe some basic firewall rules should ship, too?

@patcon
Copy link
Contributor Author

patcon commented Oct 3, 2012

Hm. Ok, so if it doesn't worry you, then it doesn't worry me :)

Good call on the firewall rules. I'll create an issue. And was learning toward knife-solo. Does knife-ec2 play nice if you're just using chef-solo?

@nerdcorenet
Copy link

These scripts are intended to facilitate a quick and easy installation of Chef-Solo onto an Amazon EC2 server.

http://www.opinionatedprogrammer.com/2011/06/chef-solo-tutorial-managing-a-single-server-with-chef/

Do you suppose this method could be adapted to use Ariadne's cookbooks and setup processes to spin up deployment instances as well as developments instances?

@patcon
Copy link
Contributor Author

patcon commented Oct 3, 2012

Hm. It might be doable, but it looks to do most of the things that knife-solo does, except knife-solo is a community-supported tool. Have you checked out knife-solo and still think that tutorial's method is preferable?

@nerdcorenet
Copy link

I certainly would like to keep with something actively maintained such as knife-solo. I found the README to be weak, though. I'm not sure how to proceed with knife-solo and therefore how I would use it to deploy Ariadne.

@patcon
Copy link
Contributor Author

patcon commented Oct 3, 2012

Hm... this will likely come into play, as ariadne depends on agent forwarding that vagrant does:
matschaffer/knife-solo#11

@patcon
Copy link
Contributor Author

patcon commented Oct 3, 2012

Doesn't yet make it through the chef run, but here are the instructions so far:
https://github.com/myplanetdigital/ariadne/tree/44-knife-solo#deploying-wip

Basically still need to clean up some of the roles and recipes that make assumptions about vagrant users and stuff like that. Will also likely need to move local-specific settings back in Vagrantfile json array too

I need to wrap up for the day, but currently stalling with this:

[2012-10-03T20:53:14+00:00] FATAL: ArgumentError: bash_profile[drupalcs-alias] (phpcs::drupal_standard line 18) had an error: ArgumentError: user vagrant doesn't exist
Run finished in 354.069475 seconds

Might be resolved by taking this discussion into account:
https://drupal.org/node/1774268

@mgifford
Copy link

mgifford commented Oct 4, 2012

Great to see this moving along. There are just so many ways to sorta do this kinda thing, but after trying a bunch of them (with limited knowledge of Ruby or Chef).... It's been frustrating.

@skottler
Copy link

skottler commented Oct 4, 2012

Most (all?) vagrant baseboxes have the 'vagrant' user already created so it exists outside of chef. @patcon I think it makes the most sense to just add a user resource to make this platform agnostic.

@patcon
Copy link
Contributor Author

patcon commented Jan 21, 2013

Working on this now.

TODO:

EDIT: Spinning these off into other issues (referenced below)

patcon pushed a commit that referenced this pull request Jan 29, 2013
Adds ability to deploy to remote server.
@patcon patcon merged commit 5efcef7 into develop Jan 29, 2013
@patcon patcon deleted the 44-knife-solo branch January 29, 2013 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants