These tools allow one to deploy a Eucalyptus cloud—in a Vagrant-provisioned VM or in a cloud instance from AWS or Eucalyptus—with minimal effort. Currently, only single-node installations in virtual resources are supported, but we have plans to support multiple nodes, bare-metal provisioining, and more.
This method produces a dev/test environment in a single virtual machine, with all Eucalyptus components deployed in it. By default, components will be built from latest source, which can be modified and immediately tested on the VM. The source will be located on a 'synced folder' (eucalyptus-src
), which can be edited on the host system but built on the guest system. Alternatively, you can install from latest packages, saving time.
-
Install VirtualBox
-
Install Vagrant
-
Install git
-
Install vagrant plugins
$ vagrant plugin install vagrant-berkshelf $ vagrant plugin install vagrant-omnibus $ vagrant plugin install vagrant-aws
-
Check out eucadev (ideally fork it and clone the fork to your local machine, so you can contribute):
$ git clone https://github.com/eucalyptus/eucadev.git
-
Optionally: Check the default parameters in
roles/cloud-controller-source.json
andVagrantfile
install-type
is"source"
by default. Set the value to"package"
for an RPM-based installation, which can take less than half the time of a source install (e.g., 20 min instead of 48), but won't allow you to edit and re-deploy code easily.- In Vagrantfile,
memory
is 3GB (3072
) by default. For a source-based install without a Web console, you may be able to get away with less, such as 1GB. Giving the VM more should improve performance.
-
Start the VM and wait for eucadev to install Eucalyptus in it (may take a long time, 20-60 min or more):
$ cd eucadev; vagrant up
-
If the test instance started successfully, you can try connecting to it via SSH:
- Connect to the VM hosting the cloud:
$ vagrant ssh
- Become
root
to read the credentials:$ sudo bash
- Source the Eucalyptus configuration file:
# source /root/eucarc
- Look up the IP of the running instnace:
# euca-describe-instances
- Connect to the instance from the VM:
# ssh -k /root/my-first-keypair root@PUBLIC-IP-OF-THE-INSTANCE
- Connect to the VM hosting the cloud:
-
Connect to the Eucalyptus admin console:
- In a Web browser on your host, go to
https://localhost:8443
- Accept the untrusted server certificate
- Use
admin
for both login and password - After a forced change of the password to something other than
admin
you'll be good to go
- In a Web browser on your host, go to
-
Install euca2ools on your host and control the cloud from the command line:
$ source creds/eucarc $ euca-describe-instances RESERVATION r-49C1448D 539043227142 default INSTANCE i-E4C54166 emi-34793865 192.168.192.102 1.0.217.179 running my-first-keypair 0 m1.small 2013-12-05T23:11:59.118Z cluster1 eki-58DF396F eri-BB603B1C monitoring-disabled 192.168.192.102 1.0.217.179 instance-store paravirtualized TAG instance i-E4C54166 euca:node 10.0.2.15
- Note: you won't be able to connect to cloud instances from your host, only from inside the VM.
This method produces a dev/test environment in a single cloud instance, with all components deployed in it. (Yes, you can run a Eucalyptus cloud in a Eucalyptus cloud or run a Eucalyptus cloud in an Amazon cloud. Inception!) By default, components will be built from latest source, which can be modified and immediately tested on the VM. Alternatively, you can install from latest packages, saving time.
-
Install Vagrant
-
Install the Vagrant-AWS plugin:
$ vagrant plugin install vagrant-aws
-
Check out eucadev (ideally fork it and clone the fork to your local machine, so you can contribute)
$ git clone https://github.com/eucalyptus/eucadev.git
-
Edit the parameters in
eucadev/Vagrantfile
to suit your needs:
-
method
of installation is"source"
by default. Set the value to"package"
for an RPM-based installation, which can take less than half the time of a source install, but won't allow you to edit and re-deploy code easily. -
aws.instance_type
ism1.medium
by default. Consider whether this instance type has sufficient memory for your Eucalyptus cloud. For a source-based install without a Web console, you may be able to get away with 1GB, but we recommend 3GB for a typical installation. Selecting a beefier instance should improve performance -
Change the other variables to match the parameters of the cloud that you would like to use:
aws.access_key_id = "XXXXXXXXXXXXXXXXXX" aws.secret_access_key = "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" aws.instance_type = "m1.medium" ## This CentOS 6 EMI needs to have the following commented out of /etc/sudoers, ## Defaults requiretty aws.ami = "emi-1873419A" aws.security_groups = ["default"] aws.region = "eucalyptus" aws.endpoint = "http://10.0.1.91:8773/services/Eucalyptus" aws.keypair_name = "vic" override.ssh.username ="root" override.ssh.private_key_path ="/Users/viglesias/.ssh/id_rsa"
-
Install a "dummy" vagrant box file to allow override of the box with the ami/emi:
$ vagrant box add dummy https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box
-
Start the VM and wait for eucadev to install Eucalyptus in it (may take a long time, 20-60 min or more):
$ cd eucadev; vagrant up --provider=aws