Overview
This guide shows you how to quickly get started with Engine Yard Kontainers (EYK) by deploying our sample Ruby Quiz application.
Please be sure to have installed Ruby 2.x, Ruby Bundler, and Git locally.
This guide uses both the EYK web console and Command Line Interface (CLI). Before you begin, download and install the EYK CLI.
Deploying an Application
The video tutorial walks through all of the steps in this guide. You can use both this guide and the video as references when deploying your own application.
Engine Yard Kontainers Video Tutorial
Step-by-Step Guide
![]() You will need to have the EYK CLI Tool downloaded and installed on your system prior to following these steps. For details, see the Download the Kontainers CLI Tool article. |
-
Create an EYK account:
-
In your browser:
- Navigate to eyk.ey.io and set up an account
-
In your browser:
-
Create a Cluster for your Application:
-
In the Clusters tab:
- Click Clusters from the menu bar at the top
- Click the '+ Add Cluster' button to create a new Cluster
- Click Clusters from the menu bar at the top
-
On the Add New Cluster page:
- Cluster Name: Enter a name for your cluster, e.g. 'quizcluster'
- Region: Select the AWS Region where you want your Cluster to reside
- Organization: Choose the account you just created
-
Click the Create Cluster button
You will be returned to the Applications page after creating your Cluster
-
In the Clusters tab:
-
Copy the ssologin command to your clipboard after your Cluster is created using the icon indicated below.
-
Use the EYK ssologin command to login:
-
Open a command line:
- Mac/Linux: Open a command line
- Windows: Click Start, then type
cmd
-
Paste and run the command from the web console:
- This is an example command, yours will vary based on Cluster and Account names.
eyk ssologin https://eyk.quizcluster.example-account.ey.io
Expected result:Logged user <user-name> (<email-address>) in.
- The ssologin command uses your browser to authenticate. Your browser should display the following:
- This is an example command, yours will vary based on Cluster and Account names.
-
Open a command line:
-
Upload your SSH key in order to deploy your code: For details on generating an SSH key see the Set up SSH keys article in the Engine Yard Developer Center for Mac and Linux users. See the Add SSH keys from Windows article for Windows users.
-
In your CLI:
-
Enter:
eyk keys:add ~/.ssh/id_rsa.pub
where:~/.ssh/
is the path to your public key on Mac/Linux orC:\Users\USERNAME\.ssh
on Windows.
Expected result:Uploading id_rsa.pub to deis... done
NOTE: These paths and filenames are examples - your actual path and filename may be different.
-
Enter:
-
In your CLI:
-
Prepare your code for the push to EYK:
-
In your CLI:
-
Enter:
git clone https://github.com/engineyard/ruby-quiz
Expected result:
Cloning into ‘ruby-quiz’...
remote: Enumerating objects: 154, done.
remote: Counting objects: 100% (154/154), done.
remote: Compressing objects: 100% (119/119), done.
remote: Total 154 (delta 23), reused 148 (delta 20), pack-reused 0
Receiving objects: 100% (154/154), 1.35 MiB | 7.06 MiB/s, done.
Resolving deltas: 100% (23/23), done.
-
Enter:
-
Navigate to the cloned repository:
-
Enter:
cd ruby-quiz
-
Enter:
-
In your CLI:
-
Create your application in EYK:
-
In your CLI:
-
Enter:
eyk create quizapp
Expected result:
Creating Application... done, created quizapp
Git remote eyk successfully created for app quizapp.To learn more about the capabilities of the EYK CLI tool, enter
eyk -h
in the command line to get a complete list of commands that are available.
-
Enter:
-
In your CLI:
-
Push your code to the new EYK remote target. This target was created in the previous step. The current branch will be deployed, 'master' in this case. Optionally, you can specify the branch of your repository using an additional parameter following 'eyk'.
-
In your CLI:
-
Enter:
git push eyk
Expected result:
Enumerating objects: 154, done.
Counting objects: 100% (154/154), done.
Delta compression using up to 4 threads
Writing objects: 100% (154/154) 1.35 MiB | 28.69 MiB/s, done.
Total 154 (deltat 23), reused 154 (delta 23)
remote: Resolving deltas: 100% (23/23), done.
Starting build... but first, coffee!
——> Restoring cache...
No cache file found. If this is the first deploy, it will be created now.
Step 1/12 : FROM ruby:2.6.6
...
Done, quizapp:v2 deployed to Workflow ... To ssh://eyk-builder.<cluster-name>.<account-name>.ey.io:2222/rubyquiz.git
* [new branch] master -> master
-
Enter:
-
In your CLI:
-
Test your application: Validate that your application is up and running by connecting to your application’s URL. Executing the open command will open the application in your default browser.
-
In the CLI:
-
Enter:
eyk open
-
Enter:
-
In the CLI:
-
Success! You just deployed your first application on EYK.
Comments
Article is closed for comments.