Introduction
|
Cloud computing is very flexible and has many diverse uses.
Setup of Alliance cloud environments is left to its users, enabling great flexibility but requiring more knowledge.
In this course we will setup a cloud environment to run a Jekyll site.
|
Why static websites?
|
Easier to dive into the components making up a site.
Static websites render faster as code doesn’t need to be run first, databases don’t need to be queered.
Easier to backup as static websites are a set of static files that can just be copied.
Popular static websites have far fewer or no security patches required as compared to dynamic sites.
|
First Jekyll site
|
Jekyll converts Markdown to HTML
Site wide configuration in _config.yml
YAML is used to express settings using key : value pairs
Setting up a site in a new location often requires changing the sites baseurl
The jekyll build command generates a site from Markdown and a theme
|
Page front matter
|
|
Site configuration
|
|
Pages and markdown I
|
|
Pages and markdown II
|
|
Pages and markdown III
|
|
Posts and assets
|
|
How the Internet works
|
Computers often have an IP on a LAN and connect to the Internet through a router.
You can see what your computer’s IP address is by using either ipconfig on windows or ifconfig commands on linux or Mac.
You can see your computer’s public IP using the site ipv4.icanhazip.com.
Ports allow computers and routers to differentiate types network traffic.
|
Introduction to cloud computing
|
Elasticity refers to the ability to scale devices up or down to meet demand.
A Virtual Machine or Virtual Device is simulated with software running on physical hardware.
A cloud allows one to borrow or rent virtual devices on-demand.
Infrastructure as a Service (IaaS): the service provider provides you with the ability to create and manage virtual devices. You have complete control over VM configuration.
Platform as a Service (PaaS): the service provider provides you with an environment to build and setup your software.
Software as a Service (SaaS): the service provider provides the software and all the infrastructure and operating system configuration and management required to run the software. (e.g. gmail).
OpenStack is a cloud operating system which allows you to manage your virtual devices.
|
Creating a keypair
|
A shell is a text based method for interacting with a computer.
SSH is a Secure SHell that allows remote interaction with a computer.
An SSH key pair allows a user to be authenticated on a remote computer.
The Linux filesystem is a tree with / at the root and directories creating branches.
The cd command is used to change directories.
The pwd command is used to display the current working directory.
The ls command is used to list the directory structure.
The ssh-keygen command is used to create key pairs.
The cat command is used print the contents of a file to the terminal.
The chmod command is used change the file mode or permissions.
The private key, id_rsa , must only be readable and writable by the file’s owner.
|
Creating a persistent virtual machine
|
The flavor of a VM prescribes the hardware profile of the VM.
A boot source specifies from what the VM should boot.
A public key must be inject into the VM in order to connect to it.
A floating IP must be added to a VM to connect to it from outside the local network in the cloud.
Port 22 must be opened in the security rules to allow SSH to connect to the VM.
A security group controls which ports to allow traffic in and out on.
|
Applying updates
|
Use the sudo command to run commands following it as an administrator.
Use sudo apt update to update the package list.
Use sudo apt upgrade to upgrade packages.
Reboot after updates have been installed by running the reboot command.
You may need to repeat the apt update , apt upgrade , reboot process a few times to ensure all updates have been applied.
|
Creating a web server
|
Use apt search to find a specific package name.
Use apt install to install packages.
Open port 80 in your security group for HTTP access to your site.
|
Installing Jekyll
|
|
Moving your jekyll site
|
|
Hosting a site on github
|
|
Remote desktop primer/outline
|
Remote desktop allows you to run a graphical user interface remotely on your VM
VNC is a software that allows you to use a remote desktop
VNC runs on ports 5901 and upward
VNC traffic is not secure
We can use VNC securely by running it through an SSH tunnel
|
Remote desktop foundation
|
|
VNC viewer
|
|
VNC, the wrong way
|
We can score an easy win by doing VNC the wrong way (but we shouldn’t)
We can expose our VM to unnecessary risk
VNC traffic is not secure by default
Reducing the holes in your firewall enhances security
Binding a server to only accept connections from localhost enhances security
|
VNC through a tunnel
|
We can set up a secure VNC connection with an SSH tunnel
All of our SSH traffic goes through port 22
Traffic to our VNC server is encrypted
Our VNC server only accepts connections from localhost
|
Remote Desktop Applications
|
|