Lecture 1 Intro To Cloud, Git and VMs
Lecture 1 Intro To Cloud, Git and VMs
CSE2WDC – CSE5WDC
Web Development on the Cloud
31/07/2019
‹#›
Lectures and Lecturer
Lectures (Semester 2, 2019 – 12 weeks):
• Wednesday 8:00am – 10:00pm in PW-215 of Peribolos West building
Lecturer
• Lianhua Chi
• Office: TC 314
• Email: [email protected]
• Consultation Time: Wednesday 12:00pm – 2:00pm
‹#›
Lab Class
● It is very important to come to labs.
● 11 normal labs starting from week 2.
● 1 take home lab on the topic of HTML/CSS
● For each lab:
● One mark for attempting but not completing lab
● Two marks for attempting and completing lab
‹#›
Resources
Subject Website:
• URL: https://lms.latrobe.edu.au/course/view.php?id=69077
You use your student online username and password to log in to
the Learning Management System (LMS)
Lecture Slides:
• Available on the above URL
Textbook:
• Phil Ballard. 2018. Sams Teach Yourself JavaScript in 24 Hours -
Seventh Edition, SAMS.
• Cory Gachenheimer. 2015. Introduction to React, APress
‹#›
Introduction
1. Lectures and Labs
2. Resources
3. Assessment
4. Topics Covered
5. Outline
‹#›
CSE2WDC Assessment
● One 3-hour end of semester examination 70 %
● Normal Labs 8%
‹#›
CSE5WDC Assessment
● One 3-hour end of semester examination 60 %
● Normal Labs 8%
‹#›
How to pass this subject
• Attend lectures
• Complete lab classes
• Submit assignment (Do not COPY)
• Attend exam
‹#›
How to pass this subject
PRACTISE
PRACTISE
PRACTISE
‹#›
Introduction
1. Lectures and Labs
2. Resources
3. Assessment
4. Topics Covered
5. Outline
‹#›
Course Outline
● Lecture 1
● Introduction to cloud, version control (Git) and virtual
machines
● Lecture 2
● Docker and Front end (HTML / CSS)
● Lecture 3
● Front end (continued) and Javascript programming
● Lecture 4
● Front end: The React Javascript library for building
user interfaces
‹#›
Course Outline
● Lecture 5
● Front end: The Redux predictable state container for
JavaScript apps
● Lecture 6
● Back end: Node.js and the sequelize object relational
mapping
● Lecture 7
● Back end: Testing, server side rendering and
Web Services
‹#›
Course Outline
● Lecture 9
● Cloud Computing and AWS Cloud Services
● Lecture 10
● (Continued) AWS Cloud Services: RDS, ELB, Auto
● Lecture 12
● Exam Revision
‹#›
SUBJECT INTENDED LEARNING
OUTCOMES (SILOs)
Upon successful completion of this subject, you
should be able to:
● Identify the best cloud based web services to use to build a given
scalable web site.
● The ability to design and build a stateless web server based on
cloud technologies.
● Ability to use modern software engineering tools to build and
deploy robust code for scalable web sites.
● Identify the best storage technologies to use when building a
particular given web site. ‹#›
Introduction
1. Lectures and Labs
2. Resources
3. Assessment
4. Topics Covered
5. Outline
‹#›
Lecture and Lab Class Outline
• Note:
Lab Classes will be held in BG level 1 labs. You only
need to attend 2 hours lab each week.
‹#›
END
Overview
Any questions?
‹#›
CSE2WDC/CSE5WDC
Web Development on the Cloud
Lecture 1
Semester 2 - 2019
‹#›
Introduction to Cloud Computing
‹#›
What is Cloud Computing?
● Cloud computing includes the following
● Software as a service (SaaS)
hardware
● Utility computing
● No up-front cost
‹#›
Good paper
● A very good paper you should read
● A view of Cloud Computing, Michael Armbrust,
‹#›
More Contents about
Cloud Computing will be
introduced
in Lecture 9
‹#›
Version Control
Introduction to Git
‹#›
Version Control: Why Use
it?
● Working on a shared project
‹#›
Why Use a Version Control System (VCS)?
● Collaboration
● Imagine a team of people are working on the same set
of files.
● If two people change the same file at the same time,
‹#›
Local Version Control
● Even for a single developer having a version control
system is good since it allows a person to keep track all
the different versions of his/her files.
● The repository or version database stores all the different
versions of all the files.
● In order to use or modify a file from the repository a user
checks it out of the repository. He or she can then modify
the file and then check it into the repository again.
● The newly checked in file becomes a new version of
the file.
‹#›
Version Control System
Architectures
● Centralized Version Control
● e.g CVS, Subversion (SVN), Perforce
‹#›
Centralized Version Control
‹#›
Centralized Version Control
‹#›
Centralized Version Control
‹#›
What is wrong with Centralized Version
Control?
● The entire project is stored only at the central server.
● If the central server dies you lose everything
‹#›
Distributed Version Control
● Distributed Teams
● As software development has become more team-
‹#›
Distributed Version Control
● The repository is not locked
● other team members can also download the current
version of a project.
● Different snapshots over time
● Later, when a team member check the project back in,
‹#›
Distributed Version Control
‹#›
Distributed Version Control
‹#›
Distributed Version Control
‹#›
Centralized versus Distributed Version
Control
● The key benefit of distributed version control over central version control is that a
developer can work on the repository (check in and check out files) without
internet access.
● Using central version control if you have no internet access and want to
make a new version of a file you will need to manually make a new copy of
the file.
● Central version control does allow local version control if the server is
another machine.
● One important benefit for a distributed version control system is that every
developer has a copy of the entire repository. So if the data from one machine is
lost we can always get it back from repositories stored by one of the developers.
● In contrast for centralized version control if the central repository is lost then
all is lost. No developer would have a complete copy of the repository with all
its versions.
● The downside is that distributed version control is more complex to learn than
central version control.
‹#›
Git
● In this subject we will learn and use the popular
distributed version control system called Git.
‹#›
Local Git
● Lets start by first focusing on using Git in a local machine.
● Therefore for the next set of slides we will learn to use Git
on a single machine.
‹#›
A local Git project has three areas Working directory
●
● git add .
‹#›
Basic Workflow
● Modify files in your working directory.
● Stage files, adding snapshots of them to your staging area.
● Do a commit, which takes the files as they are in the staging
area and stores that snapshot permanently to your Git directory.
‹#›
Setting up Git
● Set the name and email for Git to use when you commit:
$ git config --global user.name “Bugs Bunny”
$ git config --global user.email [email protected]
● You can call git config –list to verify these are set.
● These will be set globally for all Git projects you work with.
● You can also set variables on a project-only basis by not using the
--global flag.
‹#›
Creating and Using a Repository
● To create a Git repo in your current directory:
● git init
● Then you can commit files in that directory into the repo by first
adding to the staging area and then committing into the repo:
● git add file1.java
● You can get back the original version of a file that you have
modified using the following
● git checkout file1.java
‹#›
Creating New Branches
● Git allows you to diverge from the main line of
development.
● Allows you to work without messing up the main line of
code.
● Better than creating a new copy of your source code
directory for each new branch.
● Main development branch = master.
● New versions may be created along the master branch,
or new branches can be created off of it.
● The changes to the new branches will be tracked
independently.
● The branches can possibly be merged back into the
master branch.
‹#›
Git Branching
● In this example there is a
master branch which only
contains production versions of
the code
● Production code is code
‹#›
Branching
● To create a branch called develop
● git branch develop
‹#›
Forking
● You may really like an open source Git project and want
to make a lot of changes to it.
● Also your changes may not be wanted by other people.
Therefore the owner of the original Git repository may not
want to merge your changes to the open source project.
● In this case you can fork the project.
● This will clone the entire project into a new project.
‹#›
Remote Git Repository
After this command every where you use origin it will refer to
the remote repository located at the URL specified by
<Remote URL>.
● <Remote URL> is the URL where the remote repository is
located.
● Once you add the remote repository you can now push your local
repository into the remote repository using the following
● git push –u origin master
named origin.
‹#›
Getting files from Remote Repository (fetch,
pull and clone)
● The fetch command can be used to grab all the data from a remote
repository
● git fetch <remote-name>
● To use the above command you need to first add the remote repository
into your local repository.
● If you want git to create a local repository and also grab all the data
from the remote repository in one command you can use clone instead
● git clone <remote URL>
● If you already have a copy of the remote repository but just want to
update it with the latest version you can use pull
● git pull <remote-name>
● This will update the current local git with the remote repository
specified by <remote-name>
‹#›
Git commands
command description
git clone url [dir] copy a git repository so you can add to it
git add files adds file contents to the staging area
git commit records a snapshot of the staging area
git status view the status of your files in the working
directory and staging area
git diff shows diff of what is staged and what is
modified but unstaged
git help [command] get help info about a particular command
git pull fetch from a remote repo and try to merge
into the current branch
git push push your new branches and data to a
remote repository
others: init, reset, branch, checkout, merge, log, tag
‹#›
Public versus Private Repositories
● If you have code that you want to make publicly available
for everyone to use. Use GitHub
● GitHub is the most popular public repository
repositories.
● In this subject we will be using BitBucket for our
remote repositories.
‹#›
Virtual Machines
‹#›
What are Virtual Machines?
‹#›
What are virtual
machines?
● At the base is the host, underlying hardware
● Virtual machine manager (VMM)
● Also known as the hypervisor
operating system
● E.g. Two guest operating systems can run on the same
● Flexibility
● Suspend and resume virtual machine
‹#›
Why Virtual Machines are Useful on the
Cloud?
● Consolidation of resources
● Many lightly used systems can be combined to create one more
servers.
● Many people needed to administer 2000 real servers but one or two
machines
‹#›
Why Virtual Machines are Useful on
the Cloud?
● Live migration
● Moves a running guest from one physical machine to
another.
● Useful when system is overloaded for load balancing
much faster.
‹#›
More Detail on Virtual Machines
‹#›
Conclusion
● Cloud computing is taking over the world.
● It is considered essential knowledge for any IT