Skip to content

COSCS340/How-to-Gcloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

The Gcloud assignment

Make a new webserver repo on your github user, then

image0006

Make an index.html

image0007

image0008

For Dockerfile:

image0061

image0009

Got Dockerfile and index?

image0060

Ok ready for next part

> create dockerhub account hub.docker.com

image0010

image0012

Create automated build

image0013

Select the repo

image0059

image0015

image0058

Go to "Build Settings" and hit the trigger button for master:

image0062

Done with the docker stuff for now.

Now to Google Cloud

Get dat URL from the lectures repo.

image0017

Set up yer account

image0018

Make a new cs340 project if you don't have one yet:

image0064

Select the cs340 project

image0022

image0024

Click on the compute engine to set it up for the project:

image0065

image0026

Hmm this seems to be taking awhile...

Ok done.

image0027

Click on the VM instances or the link below

image0028

image0029

or go to https://console.cloud.google.com/compute/instances to create a VM instance if you don't see that button

image0063

"Create"

image0030

Check the "Deploy a container image" so that we can use our docker container.

Remember this?

image0054

Put that title into this:

image0055

Add HTTP for the firewall:

image0033

Click that more config stuff dropdown:

image0056

Now add this into the boot script: (modify it first)

#!/bin/bash
docker rm ws
docker run -d --name ws -p80:80 YOURGITHUBUSER/webserver

image0057

Done here.

image0034

Being created:

image0035

Done:

image0036

Click on that IP: WEBSITE!

E.x. http://35.196.184.168/

Now remember to add your IP for your site to the LAST LINE of your markdown file in https://github.com/COSCS340/students !

About

How to for the first assignment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published