This is the first part of a tutorial series showing how to use Vagrant with Tiktalik.com cloud computing platform.
In this series we will teach you what Vagrant is, how to use it with recently released Tiktalik.com provider for Vagrant and how it can speed up your development time.
Vagrant is a tool for configuring and deploying multiple development environments.
It works on Linux, Mac and Windows and it uses VirtualBox for the virtualization needs. Thanks to modular architecture it can be extended with plugins and VirtualBox virtualization can be replaced with Tiktalik.com cloud hosting!
Lets assume you have a Windows laptop. Thanks to Vagrant you can have a Linux-based environment up and runing in no time with all necessary packages installed using provisioning mechanism built-in into Vagrant. All this without dual booting or mundane process of Linux installation.
The tutorial assumes you have already installed Vagrant. If not, please refer to Vagrant documentation, installation process is described there really well:
To install the plugin just run the following command:
$ vagrant plugin install vagrant-tiktalik Installing the 'vagrant-tiktalik' plugin. This can take a few minutes... Installed the plugin 'vagrant-tiktalik (0.0.1)'!
It really can take a few minutes as installation process uses connects to rubygems.org servers to fetch all necessary ruby gems.
Next you will have to install so called Vagrant box for Tiktalik provider with
the following command:
$ vagrant box add dummy https://github.com/tiktalik-cloud/vagrant-tiktalik/raw/master/box/tiktalik.box Downloading or copying the box... Extracting box...e: 0/s, Estimated time remaining: --:--:--) Successfully added box 'dummy' with provider 'tiktalik'!
Now you are ready to use Tiktalik instances with Vagrant!
To use Tiktalik platform instead of VirtualBox you will need to create regular vagrant configuration file -- Vagrantfile -- and fill some Tiktalik-specific settings.
Log in to administration panel to get all necessary keys and UUIDs.
You will need:
With all these UUIDs you are ready to prepare Vagrantfile. You can create default one with the following Vagrant command:
$ vagrant init
Or just use your favourite editor and paste the following, filling in your information where necessary:
Vagrant.configure('2') do |config| config.vm.provider :tiktalik do |provider, override| # path to private ssh key, public one has to me uploaded to # tiktalik.com and it's UUID provided below as `provider.ssh_key` override.ssh.private_key_path = '~/.ssh/id_dsa' override.vm.box = 'tiktalik' # hostname for your instance, ie vagrant-host.youraccount.p2.tiktalik.com override.vm.hostname = 'vagrant-host' # api credentials, get them from https://tiktalik.com/panel/#apikeys provider.api_key = 'api key' provider.api_secret = 'api secret' # system image UUID, this one is for Ubuntu 12.04.3 LTS 64-bit< # get more ids from https://tiktalik.com/panel/#templates< provider.image = '4a2b3e72-47f1-4e88-b482-1834478ade28' # your SSH key UUID, get one from https://tiktalik.com/panel/#sshkeys provider.ssh_key = 'here goes ssh key uuid' end end
Save the file and your are ready to fire up your first Tiktalik instance using Vagrant:
$ vagrant up --provider=tiktalik
This process can take some time. Check administration panel to watch progress.
If all goes well you will see the following:
Bringing machine 'default' up with 'tiktalik' provider... [default] Launching an instance with the following settings... [default] -- Image: 4a2b3e72-47f1-4e88-b482-1834478ade28 [default] -- Hostname: vagrant-default [default] -- Size: 0.5 [default] -- SSH key: d5c6b671-6cba-41fe-9020-5d5e1dda85f9 [default] -- Networks: ["212c7fd1-6018-41ff-9a01-a37956517237"] [default] Waiting for instance to become "ready"... [default] Waiting for SSH to become available... [default] Machine is booted and ready for use! [default] Rsyncing folder: /your-path/your-directory/ => /vagrant
All basic Vagrant commands are supported, so you can:
If you have any questions feel free to drop us an email email@example.com
Don't forget to check out our Facebook profile https://www.facebook.com/TiktalikCloud and to follow us on Twitter https://twitter.com/TiktalikCloud !
In the next part of this tutorial we will show how easy is to do basic provisioning of your Vagrant-managed Tiktalik instance.