Difference between revisions of "OPS635-lab-docker"

From CDOT Wiki
Jump to: navigation, search
m (Pre-Requisites)
(Submission)
(4 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
===Materials===
 
===Materials===
 
*One Solid State Drive (SSD), minimum capacity 240GB, in a USB3 Enclosure.
 
*One Solid State Drive (SSD), minimum capacity 240GB, in a USB3 Enclosure.
==Investigation 1: Creating a docker swarm==
+
==Investigation 1: Creating a Docker Swarm==
*Install docker on three virtual machines of your choice.
+
*Install Docker on three virtual machines of your choice.
**Note:  Do not use docker on your host, as it may interfere with other services covered in this course.
+
**'''Note:''' Do not use Docker on your host, as it may interfere with other services covered in this course.
*Pick one of your machines to be the swarm manager, so start a swarm on it, and make the others join the swarm as nodes.
+
**'''Note2:''' Do not install Docker from the default CentOS repository! Refer to your lecture notes and slides for the correct method.
 +
*Pick one of your machines to be the swarm manager, start a swarm on it, and make the others join the swarm as nodes.
 +
 
 
==Investigation 2: Deploying an image across the swarm==
 
==Investigation 2: Deploying an image across the swarm==
 
*Run a container using the existing image for httpd and make some changes to the index.html file by using docker exec (The exact content is not important just include some text that says ‘version 1’, I just want to see that you can modify it).
 
*Run a container using the existing image for httpd and make some changes to the index.html file by using docker exec (The exact content is not important just include some text that says ‘version 1’, I just want to see that you can modify it).
Line 19: Line 21:
 
*Write a compose file that will deploy one copy of your container onto each of your machines.
 
*Write a compose file that will deploy one copy of your container onto each of your machines.
 
==Submission==
 
==Submission==
Demonstrate your swarm working in class, and upload your composefile to blackboard.
+
# Demonstrate your Swarm working in class.
 +
# Upload your Compose file to Blackboard.

Revision as of 01:26, 17 May 2019

OPS635 Docker Lab: Cluster Management Using Docker

Overview

Deploying services as containers in a swarm can make it easy to rapidly deploy it across your network, and to scale it up and down as needed.

Pre-Requisites

  • You must have an installed host, with at least three virtual machines.
  • Each machine must be running an up-to-date version of CentOS 7.

Materials

  • One Solid State Drive (SSD), minimum capacity 240GB, in a USB3 Enclosure.

Investigation 1: Creating a Docker Swarm

  • Install Docker on three virtual machines of your choice.
    • Note: Do not use Docker on your host, as it may interfere with other services covered in this course.
    • Note2: Do not install Docker from the default CentOS repository! Refer to your lecture notes and slides for the correct method.
  • Pick one of your machines to be the swarm manager, start a swarm on it, and make the others join the swarm as nodes.

Investigation 2: Deploying an image across the swarm

  • Run a container using the existing image for httpd and make some changes to the index.html file by using docker exec (The exact content is not important just include some text that says ‘version 1’, I just want to see that you can modify it).
  • Commit these changes and push your image to docker hub.

Investigation 3: Managing how images are deployed

  • Write a compose file that will deploy one copy of your container onto each of your machines.

Submission

  1. Demonstrate your Swarm working in class.
  2. Upload your Compose file to Blackboard.