Changes

Jump to: navigation, search

OPS635-lab-docker

1,136 bytes added, 17:12, 14 March 2020
no edit summary
===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 swarmRunning Docker Containers==*Install docker Docker on three one of your virtual machines of your choice.**'''Note: ''' Do not use docker Docker on your host, as it may interfere with other services covered in this course.*Pick one of *'''Note2:''' Do not install Docker from the default CentOS repository! Refer to your lecture notes and slides for the current correct method.*Run the 'hello-world' image to ensure your machines installation is working.**Feel free to be remove the swarm manager, so start a swarm on it, container and make the others join the swarm as nodesimage afterwards. ==Investigation 2: Deploying an image across the swarma Container From a Custom Image==*Run a container using the existing image for httpd and make .**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).**Make some changes to the httpd.conf file (e.g. replace the ServerName parameter, so it stops throwing error messages).*Commit these changes and push your image to docker hubwith the tag v1.*Create a dockerfile to create a new image from your v1, with the following changes:**At least one label identifying yourself as the maintainer for the image.**Identify port 80 as accessible for machines that run containers based on this image.**Identify the DocumentRoot as a place that directories can be mounted into.*Build the image based on your dockerfile, tagging it as v2.*Run a container based on your v2 image. Access it to make sure it works.*Once you are sure it works, upload your v2 image to docker hub. ==Investigation 3: Managing how images are deployedCreating a Docker Swarm ==*Install docker on two more VMs.*Pick one of your machines to be the swarm manager, start a swarm on it, and make the other two join the swarm as nodes.
*Write a compose file that will deploy one copy of your container onto each of your machines.
 
==Investigation 4: Managing how images are deployed==
*Modify your compose file so that two copies of your v2 image will be run on each of your worker machines, but none on the swarm manager.
 
==Submission==
Demonstrate # Upload your swarm working in class, dockerfile and upload your composefile docker Compose file to blackboardBlackboard.
932
edits

Navigation menu