Installing Deis on Bare Metal

This post will be described how i did Deis installation from start to finish on bare metal.

3 nodes will be used in the installation. I have VivoPC with 8GB RAM.

Prepare the LiveCD

Download Ubuntu 14.04 and prepare the LiveCD(via unetbootin or Ubuntu startup disk creator).

Generate SSH Key

The deisctl utility communicates with remote machines over an SSH tunnel. If you don’t already have an SSH key, the following command will generate a new keypair named deis:

$ ssh-keygen -q -t rsa -f ~/.ssh/deis -N '' -C deis

cloud-config.yml

Here is an example cloud-config.yml

You must change the ssh_authorized_keys, discovery and all visible ip’s. You must also change the hostname for each node.(coreos-1, coreos-2, coreos-3)

Finally, you should copy the cloud-config.yml and coreos_install.sh files to livecd’s root.

CoreOS Install

  • Start from the LiveCD.
  • Open the xterm.
  • Copy the cloud-config.yml and coreos_install.sh files to home directory.

WARNING!!! coreos_install.sh script install to /dev/sda disk. If you want to install the other disk, edit this script file.

$ cp /media/cdrom/coreos_install.sh /media/cdrom/cloud-config.yml ~
$ ./coreos-install.sh

This step should be repeated for each node.

Configure DNS

See Configure DNS for more information on properly setting up your DNS records with Deis.

I used xip.io. It is so simple.

Install Deis Platform

First check that you have deisctl installed and the version is correct.

$ deisctl --version
1.4.1

If not, follow instructions:

$ curl -sSL http://deis.io/deisctl/install.sh | sudo sh -s 1.4.1
$ sudo ln -fs $PWD/deisctl /usr/local/bin/deisctl

Find the public IP address of one of your nodes, and export it to the DEISCTL_TUNNEL environment variable (substituting your own IP address):

$ export DEISCTL_TUNNEL=192.168.88.50

If you set up the “convenience” DNS records, you can just refer to them via

$ export DEISCTL_TUNNEL="192.168.88.50.xip.io"

Before provisioning the platform, we’ll need to add the SSH key to Deis so it can connect to remote hosts during deis run:

$ deisctl config platform set sshPrivateKey=~/.ssh/deis

We’ll also need to tell the controller which domain name we are deploying applications under:

$ deisctl config platform set domain=192.168.88.50.xip.io

Once finished, run this command to provision the Deis platform:

$ deisctl install platform

You will see output like the following, which indicates that the units required to run Deis have been loaded on the CoreOS cluster:

$ deisctl install platform
● ▴ ■
■ ● ▴ Installing Deis...
▴ ■ ●

Scheduling data containers...
...
Deis installed.
Please run `deisctl start platform` to boot up Deis.

Run this command to start the Deis platform:

$ deisctl start platform

Once you see “Deis started.”, your Deis platform is running on a cluster! You may verify that all of the Deis units are loaded and active by running the following command:

$ deisctl list

All of the units should be active.

Register a User

Note: The first user to register with Deis receives “superuser” privileges.

$ deis register http://192.168.88.50.xip.io:8000
username: foobar
password:
password (confirm):
email: foobar@example.com
Registered foobar
Logged in as foobar

Upload Your SSH Public Key

If you plan on using git push to deploy applications to Deis, you must provide your SSH public key. Use the deis keys:add command to upload your default SSH public key, usually one of:

~/.ssh/id_rsa.pub
~/.ssh/id_dsa.pub
$ deis keys:add
Found the following SSH public keys:
1) id_rsa.pub
Which would you like to use with Deis? 1
Uploading /home/foobar/.ssh/id_rsa.pub to Deis... done
Logout from a Controller

Logout

$ deis logout
Logged out as foobar

Login

$ deis login http://deis.example.com
username: foobar
password:
Logged in as foobar

References:

comments powered by Disqus