-
-
Save jedi4ever/980578 to your computer and use it in GitHub Desktop.
temp getting started with mccloud - for @roidrage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Only the git works for now (more or less) | |
$ git clone https://github.com/jedi4ever/mccloud | |
# the mccloud dir contains an .rvmrc which will creare a new gemset | |
$ cd mccloud | |
# Install all dependencies | |
$ bundle install | |
# Edit mccloudfile to your likings (see example file below) | |
# See some of the commands | |
$ mccloud status | |
(asks for AWS credentials), and installs them in .fog | |
press control-c | |
# Now you should be able to use most of the commands | |
# I'm currently stabilizing the patient though | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mccloud::Config.run do |config| | |
# All Mccloud configuration is done here. For a detailed explanation | |
# and listing of configuration options, please view the documentation | |
# online. | |
config.mccloud.prefix="myproject" | |
config.mccloud.environment="development" | |
config.mccloud.identity="patrick" | |
config.vm.define "backend" do |config| | |
config.vm.provider="AWS" | |
config.vm.provider_options={ :region => "eu-west-1"} | |
#admin_config.vm.provisioner=:chef_solo | |
config.vm.create_options={ | |
# ID = "ami-e59ca991" = Ubuntu 10.10 - Maverick 64-bit (Canonical/EBS) - Euwest1 | |
:image_id => "ami-e59ca991" , | |
:flavor_id => "m1.large", | |
:groups => %w(myproject-prod), | |
:key_name => "mccloud-key-patrick", | |
:availability_zone => "eu-west-1a" | |
} | |
# Set this to true if you want disable to be include if you don't specify a name | |
# config.vm.auto_selection=false | |
config.vm.forward_port("redis", 6379, 6379) | |
config.vm.forward_port("postgres", 5432, 5432) | |
config.vm.forward_port("sphinx", 9312, 9312) | |
config.vm.user="ubuntu" | |
# config.vm.bootstrap="definitions/myproject-ubuntu/bootstrap-ubuntu-system.sh" | |
config.vm.key_name="mccloud-key-patrick" | |
config.vm.private_key="keys/mccloud_rsa" | |
config.vm.public_key="keys/mccloud_rsa.pub" | |
config.vm.provision :chef_solo do |chef| | |
chef.cookbooks_path = ["myproject-chefrepo/cookbooks","myproject-chefrepo/site-cookbooks"] | |
chef.log_level = "debug" | |
chef.add_recipe("rails::backend") | |
chef.add_recipe("rails::test_data") | |
chef.json.merge!({ | |
:rails => { | |
:redis_host_ip => "<%= private_ips['backend'] %>", | |
:postgres_host_ip => "<%= private_ips['backend'] %>", | |
:sphinx_host_ip => "<%= private_ips['backend'] %>" | |
}}) | |
end | |
end | |
# config.lb.define "lb" do |lb_config| | |
# lb_config.lb.provider="AWS" | |
# lb_config.lb.provider_options={ :region => "eu-west-1"} | |
# lb_config.lb.members = [ "frontend", "frontend2"] | |
# end | |
end #End Mcloud |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment