Giter VIP home page Giter VIP logo

openstack-docker-team-4's Introduction

OpenStack-Docker-Team-4

Configure OpenStack with docker and deploy a 3 tier application

Steps:

  1. Install OpenStack Link - git clone https://github.com/openstack-dev/devstack.git

    Note - Whenever you restart the PC you need to run ./rejoin-stack.sh of devstack to run the openstack. But this may not start the keystone service. To start it manually run following command /opt/stack/keystone/bin/keystone-all --config-file /etc/keystone/keystone.conf -d

  2. Install Docker Link - https://docs.docker.com/installation/ubuntulinux/ configure HTTP_PROXY in /etc/default/docker file

  3. Install Docker-Heat plugin using link https://github.com/openstack/heat/tree/stable/icehouse/contrib/docker a. Copy contents of above directory to /usr/heat diretory b. update PATH_DIRS variable in heat.conf file to include the path /usr/heat/docker c. run ./rejoin-stack.sh

    Note - after installing Docker-Heat plugin, python 'six' library may break. To fix the issue, update 'six' library using command - sudo pip install -U six

    To test if the plugin is integrated successfully, run the following command - heat resource-type-list | grep -i Docker Output should contain - DockerInc::Docker::Container

  4. Pull following images from docker registry a. https://registry.hub.docker.com/u/rishineo/wordpress_file2 b. https://registry.hub.docker.com/u/rishineo/mysql_dbpass

  5. Start Docker deamon to listen at some specific port number. We need specify this port number in Heat template as 'docker_endpoint' to which HEAT can contact Docker API. Steps:

    1. Stop docker service - sudo service docker stop
    2. sudo docker -H : -d
Note - Before starting the deamon, you need to stop the docker service, if already running.
  1. Create a Heat Orchestration Template file

    1. Heat template specifies resources
    2. Each resource is s container
    3. Specify the image of the container
    4. Specify the environment variables that it may need e.g. two-tier-app.yaml in the repository.
  2. Go to Project->Orchestration->Stacks a. Click on Create Stack b. Upload the above mentioned yaml file c. Launch

  3. Once the stack has been created successfully, go to the overview page and note down the IP of 'blog' resource. This is the private IP where our presentation layer is hosted and this is been connected to a database layer in another container.

  4. List the docker processes running. For that run 'sudo docker ps' Note - If docker is running as deamon - you need to specify port number e.g. docker -H :5555

  5. Go into the mysqldb container. a. Type mysql b. Execute following commands

    1. create database wordpress;
  6. Access the IP of the 'blog' container in the browser. You will see the UI for wordpress.

  7. Install wordpress through UI in browser.

  8. Once installation is done, we can see the required tables have been genearted in the 'wordpress' database.

openstack-docker-team-4's People

Contributors

swaprp15 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.