| title: | Installation |
|---|---|
| description: | TODO |
| keywords: | todo |
Follow the steps below to install your own Deis platform on EC2. To complete the installation process, you will need Git, RubyGems, Pip, the Amazon EC2 API Tools, EC2 Credentials, and a Chef Server with a working Knife client.
Please note: Deis is still under active development. It should not yet be used in production.
$ git clone https://github.com/opdemand/deis.git
$ cd deisDeis requires a Chef Server. Sign up for a free Hosted Chef account if you don’t have one. You’ll also need a Ruby runtime with RubyGems in order to install the required Ruby dependencies.
$ bundle install # install ruby dependencies
$ berks install # install cookbooks into your local berkshelf
$ berks upload # upload cookbooks to the chef serverThe Amazon EC2 API Tools will be used to setup basic EC2 infrastructure. The Knife EC2 plugin will be used to bootstrap the controller.
$ contrib/provision-ec2-controller.sh
usage: contrib/provision-ec2-controller.sh [region]
$ contrib/provision-ec2-controller.sh us-west-2
Creating security group: deis-controller
+ ec2-create-group deis-controller -d 'Created by Deis'
GROUP sg-7c40f317 deis-controller Created by Deis
+ set +x
Authorizing TCP ports 22,80,443 from 0.0.0.0/0...
+ ec2-authorize deis-controller -P tcp -p 22 -s 0.0.0.0/0
+ ec2-authorize deis-controller -P tcp -p 80 -s 0.0.0.0/0
+ ec2-authorize deis-controller -P tcp -p 443 -s 0.0.0.0/0
+ set +x
Creating new SSH key: deis-controller
+ ec2-create-keypair deis-controller
+ chmod 600 /home/myuser/.ssh/deis-controller
+ set +x
Saved to /home/myuser/.ssh/deis-controller
Created data_bag[deis-build]
Created data_bag[deis-formations]
Updated data_bag_item[deis-build::gitosis]
Provisioning deis-controller with knife ec2...
...Install the Deis client using Pip. Registration will discover SSH keys automatically and use the standard environment variables to configure the EC2 provider.
$ sudo pip install deis
$ deis register http://my-deis-controller.fqdn
username: myuser
password:
email: myuser@example.com
Registered myuser
Logged in as myuser
Found the following SSH public keys:
1) id_rsa.pub
Which would you like to use with Deis? 1
Uploading /Users/myuser/.ssh/id_rsa.pub to Deis... done
Found EC2 credentials: AKIAJTVXXXXXXXXXXXXX
Import these credentials? (y/n) : y
Uploading EC2 credentials... doneFind an application you’d like to deploy, or clone an example app.
Change into the application directory and use deis create to initialize a
new formation in a specific EC2 region. Use the deis layers:scale command
to provision nodes that will be dedicated to this formation.
$ cd <my-application-repo>
$ deis create --flavor=ec2-us-west-2
Creating formation... done, created peachy-waxworks
Git remote deis added
Creating runtime layer... done
Creating proxy layer... done
Use deis layers:scale proxy=1 runtime=1 to scale a basic formation
$ deis layers:scale proxy=1 runtime=1
Scaling layers... but first, coffee!
...done in 232s
Use `git push deis master` to deploy to your formationUse git push deis master to deploy your application. Deis will
automatically deploy Docker containers and configure Nginx proxies to
route requests to your application.
To learn more, use deis help or browse the documentation.
$ git push deis master
Counting objects: 146, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (122/122), done.
Writing objects: 100% (146/146), 21.54 KiB, done.
Total 146 (delta 84), reused 47 (delta 22)
Node.js app detected
-----> Resolving engine versions
Using Node.js version: 0.10.15
Using npm version: 1.2.30
...
-----> Building runtime environment
-----> Discovering process types
Procfile declares types -> web
-----> Compiled slug size: 4.7 MB
Launching... done, v2
-----> peachy-waxworks deployed to Deis
http://ec2-54-214-143-104.us-west-2.compute.amazonaws.com ...
$ curl -s http://ec2-54-214-143-104.us-west-2.compute.amazonaws.com
Powered by Deis!