Labs #1
Homework #1 Due next class
Home mewor ork k #1: Policy licy agr greement eement Hard-copy, due at the beginning of class on Thursday (the rest due on Monday) On a blank sheet of paper, hand-write the following statement, print your name underneath the statement and then sign I will neither share code or work I have produced with other students nor receive code or work from others unless explicitly allowed by the instructor. I understand that academic misconduct will result in a grade of zero and will be forwarded to the Dean of Student Life. Portland State University CS 430P/530 Internet, Web & Cloud Systems
Home mewor ork k #1: Slack ack, , Docker er Hub ub Slack Create an account and join the Slack channel at https://pdx- cs.slack.com ( #cs430_530_cloud ) All course communications through Slack DM @wuchang Use https://bit.ly/sayat-wuchang for anonymous feedback Docker Hub (https://hub.docker.com) Create a Docker Hub account Container submission will be via upload to Docker Hub Portland State University CS 430P/530 Internet, Web & Cloud Systems
Home mewor ork k #1: Linux nux VM set setup up Do this for the laptop you bring to class everyday Install a Ubuntu 18.04 VM From http://thefengs.com/wuchang/courses/ubuntu_virtualbox.txt Download desktop installation CD image (iso) http://releases.ubuntu.com/18.04/ Portland State University CS 430P/530 Internet, Web & Cloud Systems
Launch VirtualBox Click on New and create a VM whose name is your OdinID so that it appears in all screenshots for your lab notebook Name=<Your OdinID> Type: Linux Version: Ubuntu (64-bit) Memory size: 2048MB (if you have sufficient RAM on the host) Create a virtual hard disk Create Virtual Hard Disk File size: 20.0 GB (Dynamically allocated VDI) Portland State University CS 430P/530 Internet, Web & Cloud Systems
In Settings Storage => CD drive: Click on CD icon =>Choose virtual optical disk Select Ubuntu ISO in Step 1 Portland State University CS 430P/530 Internet, Web & Cloud Systems
Then, click "Start" to boot VM using the ISO as a startup disk Install Ubuntu=>Continue => Install Now => Continue Set timezone to LA => Continue on keyboard layout=>Set login credentials Restart VM Within VM Install Python packages sudo apt-get update – y sudo apt-get install python3-pip virtualenv -y Install Docker packages sudo apt-get install docker.io -y sudo usermod -a -G docker $(whoami) Portland State University CS 430P/530 Internet, Web & Cloud Systems
In VirtualBox menu Click on Devices=>"Insert Guest Additions CD image" to install them within VM Power down the VM Portland State University CS 430P/530 Internet, Web & Cloud Systems
Tweak VirtualBox General settings for your VM to enable shared clipboard Portland State University CS 430P/530 Internet, Web & Cloud Systems
Tweak VirtualBox Display settings for your VM to improve graphics performance (128MB memory and 3D acceleration) Portland State University CS 430P/530 Internet, Web & Cloud Systems
Ensure VT-x is enabled Portland State University CS 430P/530 Internet, Web & Cloud Systems
Home mewor ork k #1: Local cal VM set setup up Ensure at least 2048MB of RAM is allocated Portland State University CS 430P/530 Internet, Web & Cloud Systems
Home mewor ork k #1: Bi Bitb tbuck ucket Create an account on Bitbucket Log out of all of your Google accounts Go to https://bitbucket.org Use your @pdx.edu e-mail address to "Login with Google" Find the + and click on it to create a new repository Name your repository cs430-<FirstName>-<LastName> (e.g. cs430-Wuchang-Feng) Then "Create repository" using default options Pause We will create a git repo on your Linux VM and connect it up to this repository Portland State University CS 430P/530 Internet, Web & Cloud Systems
Install git on your Linux VM sudo apt-get update – y sudo apt-get install git -y Configure git git config --global user.name "Your Name" git config --global user.email <OdinID>@pdx.edu Set-up ssh key access from your Linux VM Set-up an ssh key by running ssh-keygen -t rsa Copy the contents of ~/.ssh/id_rsa.pub to the clipboard Go back to Bitbucket and access your profile In Settings, click "SSH keys", then "Add key" Make sure you're adding the key to your user profile and *not* the repository! Portland State University CS 430P/530 Internet, Web & Cloud Systems
Add ssh key from previous step https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key- 728138079.html Clone the course's source repository to see that it works git clone ssh://git@bitbucket.org/wuchangfeng/cs430-src.git Portland State University CS 430P/530 Internet, Web & Cloud Systems
Then, clone repo in prior step using the ssh key added git clone ssh://git@bitbucket.org/<bitbucket_id>/cs430- <FirstName>-<LastName> Example git clone ssh://git@bitbucket.org/wuchangfeng/cs430-Wuchang-Feng Change directories into your repo ( cd cs430-Wuchang-Feng ) Create a file README.md with an initial message Add it to the files you would like to commit permanently into local repository git add README.md Commit the file permanently into local repository with a short message describing the commit git commit -m "First commit" Push the local repository onto the origin repository on the master branch git push -u origin master Portland State University CS 430P/530 Internet, Web & Cloud Systems
Go back to the new repository on Bitbucket and go to the Repository's Settings Add course instructor and TA with Read access wuchang+courses@pdx.edu lchoi+courses@pdx.edu Portland State University CS 430P/530 Internet, Web & Cloud Systems
Read the first 6 steps of https://product.hubspot.com/blog/git-and- github-tutorial-for-beginners git clone Fetch a copy of a remote repository git add Add a new file and/or directory to local repository git commit Commit changes to local repository git push Merge changes from local repository to a remote one Implicitly assumes "origin" (place that you retrieved repo from) and "master" (branch) git pull Merge changes from remote repository to your local one Implicitly assumes "origin" (place that you retrieved repo from) and "master" (branch) Portland State University CS 430P/530 Internet, Web & Cloud Systems
At the top-level of the repository, create a file called .gitignore to specify filenames that will not be added to the repository env/ *.pyc lib __pycache__/ Then git add the file to the local repo, git commit it to the local repo, and then git push the local repo to the remote repo on Bitbucket Portland State University CS 430P/530 Internet, Web & Cloud Systems
Create a directory called hw1 within local repository ( mkdir hw1 ) Within the directory Create a markdown file called README.md that contains a colorful message to me that shows me how much Markdown you know cd hw1; <editor_of_your_choice> README.md Create a file called dockerhub.txt called that contains only your DockerHub username in it. For example, my username on DockerHub is wuchangfeng so… echo wuchangfeng > dockerhub.txt Add the directory and files to your repo via git add . Commit the changes locally via git commit Push the changes to your remote BitBucket repo via git push Portland State University CS 430P/530 Internet, Web & Cloud Systems
Home mewor ork k #1: Bi Bitb tbuck ucket Note: All homework submissions will use Bitbucket in combination with D2L (for the timestamp) Commit changes to your repository frequently (part of rubric) Use descriptive messages in commit messages Other resources http://rogerdudler.github.io/git-guide/ https://confluence.atlassian.com/bitbucketserver/basic-git- commands-776639767.html Portland State University CS 430P/530 Internet, Web & Cloud Systems
Home mewor ork k #1: Go Google gle Cloud ud Platf atform rm Google Cloud Platform (GCP) IMPORTANT: Bring up a web browser in "Incognito" or "Private Browsing" mode to set up your account Go to https://console.cloud.google.com and login using your pdx.edu account to enable GCP If you haven't used GCP yet and you do not mind temporarily putting your CC on the account, apply for the $300 coupon and use it to create a new billing account https://codelabs.developers.google.com/codelabs/cpb100-free-trial Or, wait for me to e-mail you the course coupon, then apply it and create the course project Portland State University CS 430P/530 Internet, Web & Cloud Systems
Create a project called cs430-<FirstName>-<LastName> (e.g. cs430-Wuchang-Feng ) Ensure your name appears in all screenshots for your lab notebook Associate the billing account to it Portland State University CS 430P/530 Internet, Web & Cloud Systems
Recommend
More recommend