• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Manage Docker with Vagrant on OpenStack Cloud Server

By Abhishek Ghosh July 31, 2014 6:38 pm Updated on July 31, 2014

Manage Docker with Vagrant on OpenStack Cloud Server

Advertisement

Here is an easy guide on how to manage container Docker with Vagrant. This guide is tested on Rackspace Cloud Server and will work on all OpenStack IaaS. We already know what is Container Based Virtualization and how to use Docker on Cloud Server to Manage Containers. It is actually possible to Manage Docker with Vagrant on OpenStack Cloud Server – “Vagrant 1.6 comes with a new built-in provider: Docker”. We can not say whether it is possible to do with OpenShift Origin.

Disambiguation of the Names : OpenShift is Open Source PaaS software by RedHat, while OpenStack is intended for IaaS, initially developed by NASA and Rackspace. OpenShift can run on OpenStack, vice versa is not possible.

 

Manage Docker with Vagrant on OpenStack Cloud Server : Get Started

 

We will get started by installing Vagrant 1.6.x and Docker 1.1.x on Ubuntu Trusty (14.04 LTS) on Rackspace Performance 1 Flavor (PVHVM). While PVHVM is used for better performance, usage of 2GB instance (at this moment of publishing this article) will provide virtual dual core processor. Assuming that we are using a Mac (OS X 10.9.x) or any GNU Linux, we can use Docker on local computing via Boot2Docker :

Advertisement

---

Vim
1
2
3
4
# official instructions
https://docs.docker.com/installation/mac/
# github repo
https://github.com/boot2docker/boot2docker

Boot2Docker uses a Vagrant VirtualBox VM with Docker on it. As post installation process, we will set the environment variable VAGRANT_DEFAULT_PROVIDER :

Vim
1
2
3
4
5
6
# edit using nano
export VAGRANT_DEFAULT_PROVIDER=docker
# check version manually
wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.3_x86_64.deb && dpkg -i vagrant_1.6.3_x86_64.deb
# we are working via SSH - make sure that you have understood our plan
sudo apt-get install lxc-docker-1.1.1

We did it, so that Vagrant is forced to use Docker by default.

Manage Docker with Vagrant on OpenStack Cloud Server

 

Example of How We Can Manage Docker with Vagrant

 

We can create a vagrantfile to manage our Docker container based on this list of cookbook :

Vim
1
2
3
https://github.com/Krijger/docker-cookbooks
# example with mongo db
https://github.com/Krijger/docker-cookbooks/tree/master/mongo

You can use any of the recipe to test (or taste!). You can read about Vagrant configuration :

Vim
1
https://docs.vagrantup.com/v2/providers/configuration.html

If there is any problem with Path on VM (in case it is local computer), go to /vagrant/scripts and add the following line on setup.sh file :

Vim
1
echo "source /vagrant/scripts/export.sh" >> /home/vagrant/.bashrc

Below is an example vagrantfile, but look at the Docker hub first :

Vim
1
https://registry.hub.docker.com/u/quintenk/mongo/

This is an edited vagrantfile for mongo :

Vim
1
2
3
4
5
6
7
8
9
10
Vagrant.configure("2") do |config|
 
  config.vm.provider "docker" do |d|
    d.image           = "quintenk/mongo"
    d.has_ssh         = false
    d.ports           = ["27017:27017"]
    d.volumes       = ["/data/mongo:/root/.mongo"]
  end
 
end

For VM (local computer), the vagrant file might need some alteration.

This file contains a single configuration block as per documentation. docker notation declares a Docker instance and variable name is d, simply run Vagrant :

Vim
1
vagrant up

Note that, this IS A COMPLICATED example as it is mongo db and port can not be 8080. You can start with any cookbook which uses the port 8080.

Tagged With cloud computing tutorial , install docker cloud on boot2docker , openstack owncloud docker , ssh boot2docker cloud-config , vagrant file edit docker config , vagrant openstack get_api_version error

This Article Has Been Shared 912 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Manage Docker with Vagrant on OpenStack Cloud Server

  • Cloud OS Installation on Rackspace Cloud Sites

    Cloud OS Installation on Rackspace Cloud Sites is quite simple process. In this guide we will show how to install free Cloud OS Eye OS for online collaboration.

  • Cloud as a Test Environment

    Cloud as a test environment for applications is an elegant idea in theory, but needs a thorough investigation of the security and privacy aspects.

  • Installing Python Application in OpenShift PaaS

    Installing Python Application in OpenShift PaaS needs some modification and custom commands as you might not able to run. Here are some tips for Python.

  • Install Open Journal Systems on Rackspace Cloud Sites

    Install Open Journal Systems on Rackspace Cloud Sites just like any other PHP MySQL based application in easy to follow steps.

  • Rackspace Deployment Services Early Access Video Guide

    Rackspace Deployment Services Early Access Video Guide Shows How to Setup Rackspace Cloud Server, Load Balancers, Cloud Database in easy clicks from GUI.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (21K Followers)
  • Twitter (5.3k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Why Not to Use Your Host for Email Marketing March 5, 2021
  • What You Need to Know About the Microservices March 4, 2021
  • Fix Missing/Bad FileProvider for Freshchat (Android error code 354) March 3, 2021
  • Basics of Data Protection on the Internet March 2, 2021
  • What is Standard Software February 28, 2021

 

About This Article

Cite this article as: Abhishek Ghosh, "Manage Docker with Vagrant on OpenStack Cloud Server," in The Customize Windows, July 31, 2014, March 6, 2021, https://thecustomizewindows.com/2014/07/manage-docker-vagrant-openstack-cloud-server/.

Source:The Customize Windows, JiMA.in

 

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2021 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy