veldyn / b2c-sysadmin-2024

GNU General Public License v3.0
0 stars 0 forks source link

Unit 3 Lab 3 #12

Open veldyn opened 9 months ago

veldyn commented 9 months ago

For Unit 3 Lab 3 the goal is to create another walkthrough similar to Unit 3 Lab 2 that will instead have the students deploy a database server, or other stateful container. This way, we have practical examples for the two different types of containers and students have another opportunity to practice the deployment process.

veldyn commented 8 months ago

We managed to get MongoDB installed today on docker and the process was much smoother now that we have some experience from Lab 2. We're currently in the stage of trying to customize the MongoDB installation and demonstrate how to change the default password, and change any configuration settings that may not allow the database to run via localhost.

Right now it looks like we'll have to potentially work with some 'Network' component for the next lab, but it doesn't seem intuitive to solve immediately so we'll see if we can get away with not using it for now and simply including that when it becomes necessary.

We'll also need to code out a simple Javascript file to attach to the lab so that we can actually connect to our MongoDB instance from a web browser. It would be cool to pull some data as well, so perhaps we'll include a simple demo for how to add data to the MongoDB database, and then pull that for the webpage, but this is arguably stepping into the territory of Lab 4.

bgoss07 commented 8 months ago

The --network option in customizing mongodb seems like it might be important to this lab as well. I get the following error when I try to run the command without it: MongoNetworkError: getaddrinfo ENTOFOUND nameOfContainer

bgoss07 commented 8 months ago

JK about the --network option. We can create a mongodb without it.

Right now I'm trying to get a custom Dockerfile to run for mongo that incorporates creating an admin & includes some initial data.

The issue I am having is that the commands for creating the admin control are throwing an error because the commands are Mongo not Docker. I may just run Mongo commands as options in docker run as a lot of the samples suggested. When I run docker build with just the data initialization, it has no errors, but I haven't verified if the data is actually there and works. Some of the samples I saw indicated it would not actually initialize.

So for next week, I'll first go through the unit 2 lab 3 & add questions. Then I will come back to this Plan A: Run Mongo auth commands as options & verify insertion of .js file Plan B: Introduce Docker Compose & create a yaml file