vvjavle / bit-camp-learning-lab-test

https://lab.github.com/bitprj/creating-an-emotion-reader-with-azure-(face-api-and-http-triggers)
0 stars 0 forks source link

Week 1 #2

Closed github-learning-lab[bot] closed 3 years ago

github-learning-lab[bot] commented 3 years ago

Downloading an IDE

For this assignment, you will follow the instructions and complete a task showing your knowledge of the subject at the end. If at any moment you need help, feel free to contact your TAs.

Visual Studio Code

Before we start coding, we need to install an IDE. An IDE is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools, and a debugger. Although there are hundreds of IDEs to choose from, we are going to use Visual Studio Code due to its popularity and integration with Azure (via extensions and libraries).

To install VSC, go to: https://code.visualstudio.com/download and choose your operating system (ie. Windows, Mac, Linux, etc). Then click Download and run the installer (usually a .exe or .zip file). After it's installed, open it up and try it out. If you need some help navigating VSC, check out this super helpful Youtube video.

Make sure to use Dark Theme unless you want to live life on the edge...

Task 1: create a JavaScript file that prints out "Hello World" in the terminal.

Once you are done, write a comment describing what you completed.

vvjavle commented 3 years ago

I downloaded VS Code and completed printing "hello world" in javascript

github-learning-lab[bot] commented 3 years ago

Configuring Azure

For this assignment, you will follow the instructions and complete a task showing your knowledge of the subject at the end. If at any moment you need help, feel free to contact your TAs.

Azure

So what is "Azure"? According to Microsoft:

Azure is an ever-expanding set of cloud services to help your organization meet your business challenges. It’s the freedom to build, manage, and deploy applications on a massive, global network using your favorite tools and frameworks.

If you want to learn more about Azure and all its cloud applications, feel free to check out this link, an overview of its capabilities.

To create an Azure account, go to: https://azure.microsoft.com/en-us/free/ and press Start free to be relocated to a signup page. After signing in with your Microsoft account and filling in your personal details, you will be asked to add a credit card. Rest assured, this is only for security purposes (preventing multiple free accounts per person), and you won't be charged unless you choose to buy a premium account, which we do not need for this course.

If you need some help navigating Azure, check out this super helpful resource provided by Microsoft.

Task 2: create and deploy an HTTP trigger Azure Function that outputs the current time and date.

This time we'll try developing locally. Follow the directions in this link to set up and deploy your first Azure Function right in your local machine. Then to move on, commit your code to the learning lab repository and post a comment below describing what you completed.

vvjavle commented 3 years ago

Wrote and deployed function on Azure

github-learning-lab[bot] commented 3 years ago

Learning GitHub

For this assignment, you will follow the instructions and complete a task showing your knowledge of the subject at the end. If at any moment you need help, feel free to contact your TAs.

GitHub

GitHub is a cloud-based repository hosting service that is widely used in the tech industry. It allows teams to use Git for version control, collaboration, and file management. If you don't know what Git is, it's a version-control system for tracking changes, managing state, and teams concurrently developing on the same files or directories. Git and Github's tools are specifically designed to make coordinating work easier, and they are one of the most popular tools among students and the industry.

If you want to learn more about what it is and how to use it, try taking this GitHub Learning Lab Course. After finishing it, you will have a strong understanding of all the features GitHub has to offer. To make an account, go to: https://github.com/join to sign up. After making an account, you're all set to complete Task 3!

Task 3: create a repository and commit a README.md file.

Key functions you should be familiar with after this task include:

To move on, add your name to the README.md file in THIS REPOSITORY and commit the change! Also, comment a summary of what you completed!

vvjavle commented 3 years ago

Updated README.md to include name, as well as forked repo, made a new branch, and made a new pull request

github-learning-lab[bot] commented 3 years ago

📝 Week 1 Livestream Feedback

Please complete after you've viewed the Week 1 livestream! If you haven't yet watched it but want to move on, just close this issue and come back to it later.

Help us improve BitCamp Serverless - thank you for your feedback! Here are some questions you may want to answer:

vvjavle commented 3 years ago

The content was helpful and challenging. The instructor taught well and at a good pace. One tip for improvement could maybe be a little more interaction with the audience/chat

github-learning-lab[bot] commented 3 years ago

Week 1

Below is a written format of the livestream for this week, included for future reference. To move on, close this issue.

Last week, you should've learned how to use GitHub, Visual Studio Code, and deploy a simle Azure function.

Learning Objectives

Livestream

In the livestream, we're going to set up the GitHub learning lab, Visual Studio Code, and create an Azure function resource.

We'll be going over how to:

  1. enroll in/complete the GitHub course
  2. download Visual Studio Code
  3. install extentions in Visual Studio Code
  4. set up a resource folder in Azure functions
  5. deploy a simple HTTP trigger function in Azure

📝 Review: setting up Visual Studio Code

Visual Studio Code (or VSCode) was downloaded from this link: https://code.visualstudio.com

Inside VSCode, you downloaded four extensions: Azure Account, Azure App Service, Azure Functions, and Live Server. All of the Azure extensions allow you to work on your Azure Function App in VS code instead of working directly through the Microsoft portal. Live Server is a quick and temporary testing server, and you can use it to test HTML pages. To launch, right click on your html file and press "Open with Live Server" or click "Go Live" in the bottom right corner:

Screen Shot 2021-01-10 at 1 53 20 PM Screen Shot 2021-01-10 at 1 53 40 PM



🖥️ Navigating GitHub and GitHub desktop

For the GitHub portion of the week, there are two core things to remember:

  1. repositories
  2. committing changes

Repositories (or repos) are essentially folders where you can store files of code. The repo of our learning lab was duplicated into your profile when you enrolled in the course so that you can commit changes and complete each lesson.

For our learning lab, each lesson is placed inside an issue. Only when you complete the lesson (committing the necessary code and commenting), will the issue close and you can move on to the next issue. Don’t worry – committing changes is easier than it sounds.

Here are the steps to cloning and committing changes to the learning lab repo (through GitHub desktop):

  1. Download GitHub desktop. This is one way you can commit changes to the learning lab to complete each lesson here.
  2. To have access to the learning lab on GitHub desktop, the name of the learning lab repo needs to be entered in the top-left corner in the box with placeholder “Filter” and “Clone Repository” should be selected.
clone
  1. Click “Pull Origin” once the repo is cloned to pull to GitHub desktop the most current version of the learning lab.
  2. Open VSCode by clicking the button “Open in Visual Studio Code”. The files in the learning lab will be opened in VS code, and now you can complete the lesson (adding the necessary code). You need to add your code in a new file, so make sure you create a new file under the folder in VSCode. When you are done creating your new file and adding the necessary code, save the file and return to GitHub desktop.
  3. The change will be shown. Add a summary and description of your change and then click “Commit to main”. Next, click “Push origin”, to push the change made in VSCode to the website.
steps4desktop

Remember, each step and lesson is posted on the repo on github.com. You will commit changes when the lesson instructs you to, and once you click “Push origin” and refresh the GitHub page, the issue will close and you can move on.

You don’t have to commit changes on GitHub desktop, though.

Here are the steps to committing code on the GitHub website:

  1. In the learning lab repo, there should be a button labeled “Add file” – click it.
  2. Click the dropdown option “Create new file”.
  3. You can add your code there, and when you are finished, you can click “Commit new file”
  4. If you click the second dropdown option under the “Add file” button (“Upload files”), you can upload a file from VS code that is saved in your computer.

⚡️ Navigating the Azure Portal

Working with Azure Functions was the biggest task of the week (and vital to the next seven weeks).

Here are the steps to creating a resource and deploying a simple HTTP trigger function in that resource:

  1. Click “Create a resource” in your portal (near the top left of the screen)
resourceCreate
  1. Choose “Function App” (it should be in the list of popular resources, with the lightning logo)
FunctionApp
  1. Create a new resource group, with a unique resource name (make it relevant to what the app does). Add a unique Function App name as well.
  2. Make sure the "Code" button is selected next to Publish, the Runtime stack is Node.js, and the Version selected is 12 LTS
codeDocker
  1. Select your region
  2. All of the other tabs in this step should be correctly filled (you can double-check them if you want), so you should be ready to click “Create”
  3. Deploying may take a few minutes – be patient!
  4. Once the function is deployed, open it and go to the “Functions” tap on the left (with symbol {fx}).
  5. Click “Add” on this page, and then “HTTP trigger” (in the side window that opens)
  6. Click “Add” (at the bottom of the side window) – creating this HTTP trigger may take a few seconds, so remember: patience!
httpTrigger
  1. Once this trigger is created, it should open automatically. Click the “Code + Test” tab on the left side, and the code should open.
code+Test
  1. If you need to review the code we created, review the livestream.
  2. Click “Save” and “Refresh” (in that order, and refresh only once the trigger has completely saved) when you have finished writing your code (or in between – it never hurts).
  3. Click “Test/Run” once you are ready to try out your new trigger function. If it all works smoothly, and the code has no errors, you should receive the correct time based on the information inputted!

One more tip: don’t forget to save! Rewriting code can be challenging and extremely frustrating, so save yourself the trouble!

🎉 That's the Week 1 Livestream! Reach out to your instructors if you're having trouble.

To move on, comment any questions you have. If you don't have any questions, comment Done.

vvjavle commented 3 years ago

Done

github-learning-lab[bot] commented 3 years ago

That's it for Week 1! Click here to move on to Week 2!