Walkthrough of Course Project

CourseProj1660Final

Walkthrough of How I Complete Project Option 1 for 1660

  1. Build Main App

I built the main application by altering the example application used in https://cloud.google.com/kubernetes-engine/docs/tutorials/hello-app. Built this applications container and stored it to gcr with these commands:
a. git clone https://github.com/GoogleCloudPlatform/kubernetes-engine-samples
b. cd kubernetes-engine-samples/hello-app
c. Changed main application to display the messages that I want in the hello.go file
d. docker build -t REGION-docker.pkg.dev/${PROJECT_ID}/hello-repo/hello-app:v1 .

  1. Tested other containers for hadoop, sonarqube/sonarscanner, spark, and jupyter.
  2. For all images other then main application I pulled, tagged, then pushed to gcr

Example Commands for Jupyter Image (Not Used on Main Application): docker pull jupyter/datascience-notebook
docker tag jupyter/datascience-notebook gcr.io/cs1660proj/jupyter
docker push gcr.io/cs1660proj/jupyter

  1. Created my cluster named my-cluster, set to autopilot a. Command: gcloud container clusters create-auto my-cluster
  2. Set the project ID a. Command: export PROJECT_ID=test-app1660
  3. Deployed containers in GCR to my-cluster. I editted the datanode to have two replicas while the rest were editted to have 1 replicas.

For hadoop namenode and datanodes I had to add environment variables that were within this file: https://github.com/big-data-europe/docker-hadoop/blob/master/hadoop.env (First 9 Lines) I deployed these by going to container registry >> deploy >> added ports >> added env variables >> then continued
Add this env variable for namenode: - CLUSTER_NAME=test Add this env variable for datanode: SERVICE_PRECONDITION: "namenode:9870" Example Commands for Jupyter (Variation of these commands were used for all containers except for hadoop datanodes and namenode):
kubectl create deployment jupyter --image=jupyter/datascience-notebook kubectl scale deployment jupyter --replicas=1 kubectl autoscale deployment jupyter --cpu-percent=10 --min=1 --max=5

  1. Edit yaml files so they use 250m cpu and 1Gi memory so that I had enough for all
  2. Expose the pods.

Jupyter was exposed to port 8888
Sonarqube: 9000
Main application: 8080
Spark: 8080
Hadoop: 9870:9000
Example Command for Jupyter: kubectl expose deployment jupyter --name=jupyter-service --type=LoadBalancer --port 80 --target-port 8888
*For hadoop I manually created the service so I could expose both ports.

  1. Update the Main Terminal Application so that it displays the links for all the pods

Commands: kubectl get svc (to see the external ip addresses)
docker build -t us-east1-docker.pkg.dev/${PROJECT_ID}/hello-repo/hello-app:v2 .
docker push us-east1-docker.pkg.dev/${PROJECT_ID}/hello-repo/hello-app:v2
kubectl set image deployment/hello-app hello-app=us-east1-docker.pkg.dev/${PROJECT_ID}/hello-repo/hello-app:v2 (This line was executed after I changed print statements to have the external IP addresses)

How to Use Application:

Navigate to 34.75.201.101
Follow Instructions on page

A CLOSE VARIATION OF EXAMPLE COMMANDS WERE USED FOR ALL CONTAINERS/DEPLOYMENTS/PODS UNLESS I SPECIFIED IT WAS NOT USED FOR A SPECIFIC ONE

Similar Resources

Learn the Go programming language (Golang) in this step-by-step tutorial course for beginners

Learn the Go programming language (Golang) in this step-by-step tutorial course for beginners. Go is an open source programming language designed at Google that makes it easy to build simple, reliable, and efficient software.

Dec 16, 2021

Labs from MIT's graduate-level Distributed Systems course

Labs from MIT's graduate-level Distributed Systems course Course website here Lab 1: MapReduce Lab 2: Raft Consensus Algorithm Lab 2A: Raft Leader Ele

Jun 20, 2022

Go: The Complete Developer's Guide (Golang) Udemy Course by Stephen Grider

Go-The-Complete-Developers-Guide Go Command line tools 1. go build - compiles a bunch of go source code files go build

Dec 29, 2021

Ssba - Sandbox for exercises from Software Systems: Behind the Abstractions course

Software Systems: Behind the Abstractions This is my messy exercise sandbox for the Bradfield course Software Systems: Behind the Abstractions. The go

Aug 23, 2022

Rps-game-in-go - Learn Go for Beginners Crash Course (Golang)

rps-game-in-go This rock-paper-scissors game was based on the Udemy course "Lear

Mar 20, 2022

A snapshot of the assets for the Learn Go course on FreeCodeCamp's youtube

Assets for "Learn Go" on FreeCodeCamp This is a snapshot of the code samples for the "Learn Go" course on Boot.dev at the time the video for FreeCodeC

May 12, 2023

This is my first golang project. The main reason for its existence is the need for practice. I will be studying golang while writing this project

My first GoLang project Project Aim The goal of this project is to develop the most simple golang bot to learn how to work with this programming langu

Jan 7, 2022

Go-beginners-guide-project - golang beginners project from tutorialedge.net

Go Beginner's Project Running Locally If you want to run this application locally then run the following commands: $ go run cmd/cli/main.go Build Appl

Jan 2, 2022

This project is a collection of many of the basic tools used on Unix-like operating systems implemented in Go as a learning exercize.

GoUnix This project is a collection of many of the basic tools used on Unix-like operating systems implemented in Go as a learning exercize. The idea

Jul 21, 2022
This slide deck and supporting material is part of the Introduction to Go training course by Dave Cheney

This slide deck and supporting material is part of the Introduction to Go training course by Dave Cheney.

Nov 14, 2022
A course to build distributed key-value service based on TiKV model
A course to build distributed key-value service based on TiKV model

The TinyKV Course This is a series of projects on a key-value storage system built with the Raft consensus algorithm

Jan 7, 2023
Crash Course about the programming language Go / Golang.
Crash Course about the programming language Go / Golang.

Crash Course about the programming language Go / Golang. In this course I have covered some important concepts and topics in programming.

Oct 10, 2022
This is from the udemy course: Go: The Complete Developer's Guide (Golang)

Go Udemy course - "Go: The Complete Developer's Guide (Golang)" How to run the file: go run hello-world.go go run <filename>.go GO CLI commands: go ru

Oct 22, 2021
Implementation diploma work for YANDEX course "GO Musthave"

go-musthave-diploma-tpl Шаблон репозитория для индивидуального дипломного проекта курса "Самостоятельный Go-разработчик" Начало работы Склонируйте реп

Apr 12, 2022
This is the repository for the LinkedIn Learning course Learning Go.
This is the repository for the LinkedIn Learning course Learning Go.

Learning Go This is the repository for the LinkedIn Learning course Learning Go. The full course is available from LinkedIn Learning. What is Go? Go i

Nov 2, 2021
TinySQL is a course designed to teach you how to implement a distributed relational database in Go

TinySQL TinySQL is a course designed to teach you how to implement a distributed relational database in Go. TinySQL is also the name of the simplifed

Nov 7, 2021
Repo for the final proyect in the internal golang course in nearshore

golang_course Repo for the final proyect in the internal golang course in nearshore Basicamente, insert y lee el uuid insertado en una tabla de AWS Am

Nov 11, 2021
A Udemy course on how to create an industry standard REST API

go-rest-industry-standard This repository is for a Udemy course on how to create an industry standard REST API. It applies the MVC pattern, routing, a

Nov 23, 2021
A combination of work from docs and a udemy course

Learning Go Some scrath work while learning go Motivation I think I need a bit of a break from dynamically typed scripting langauges. I've enjoyed pla

Nov 25, 2021