Prerequisites¶
The following list of Day 0 operations are the prerequisites for the live workshop session, and should be completed in order.
-
Set up a cloud services account¶
GitHub Universe 2024 session provision
Participants at the live session will be provided with Azure subscriptions and details will be shared at the beginning of the workshop.
In the workshop, we will deploy an application to a cloud provider. GitHub generally supports secure integration with most cloud providers; at this point of preparation for the work, we will ensure we have a properly setup cloud provider account.
Although you may use your existing Azure
subscription, we do recommend you create a completely new account (and subscription) for this workshop and leverage the$200Azure credit on offer for your new subscriptions.Take note of your subscription id
We will use the
subscription idto provision the infrastructure resources to be deployed to. Find your Azure subscription.This aspect of the workshop is currently not supported, but you can help contribute the guide. Would you like to help the community learn to secure their deployments to AWS?
This aspect of the workshop is currently not supported, but you can help contribute the guide. Would you like to help the community learn to secure their deployments to GCP?
-
Set up a GitHub account¶
GitHub Universe 2024 session provision
Participants at the live session will be provided with a GitHub Enterprise Managed User account (including GitHub Copilot and GitHub Advanced Security features). Account details will be shared at the beginning of the workshop the session.
Learn more about "About Enterprise Managed Users".
Login to your GitHub account. You may create a new GitHub account, if you do not already have one. (1)
Clicking the button below will open the page on a new tab, for you to create a new GitHub account. Keep your
@handlehandy after you have logged in.
-
Use the workshop template to create a new repository¶
Clicking the button below will lead you to create the workshop project in a new browser tab. The repository creation form should already be correctly pre-filled you. After proofing the form, scroll down to the bottom of the page and click the button to create the repository.
-
Individuals who are not a member of an enterprise may choose a
publicrepository visibility to take advantage of significantly many of GitHub platform's features at no cost. (1)-
GitHub supports open-source software development by making public repositories benefit from
-
-
-
Create a cloud development environment instance¶
GitHub Codespaces enable you to instantly create a productive development environment and start coding on the workshop project. Personal accounts on GitHub can benefit from a free quota of GitHub Codespaces usage.
To begin, go to your newly created repository
- Navigate to the Code tab.
- Open the menu and click on .
-
Provision cloud service infrastructure¶
We will take advantage of managed services to provide a framework for resiliently deploying and running our application.
Azure App Service provides a framework for developing and running apps in the cloud. PaaS providers host and maintain the platform's servers, networks, storage, and other computing resources. Developers use the platform to build apps without having to manage backups, security solutions, upgrades, or other administrative tasks. App Service also includes tools, services, and systems that support the web application lifecycle.
The
infrastructure/day-0/provision.azcliscript is designed to provision the required cloud resources on Microsoft Azure.-
Line
8Securely creates an Azure login session and prompts you to select the subscription on which the script will act on.
-
Lines
10 - 11infrastructure/day-0/main.bicepcontains the infrastructure deployment template.
- Whereas
infrastructure/day-0/parameters.jsoncontain the values for variables that are referenced in the template.
-
Line
13Reads the Azure region in which resources will be provisioned are read from the
infrastructure/day-0/parameters.jsonfile. -
Line
15Designates the outcome of the deployment to be written to
infrastructure/day-0/deployment-outputs.json.
This aspect of the workshop is currently not supported, but you can help contribute the guide. Would you like to help the community learn to secure their deployments to AWS?
This aspect of the workshop is currently not supported, but you can help contribute the guide. Would you like to help the community learn to secure their deployments to GCP?
-
-
Get familiar with GitHub Apps¶
GitHub Apps are tools that extend GitHub's functionality. GitHub Apps can do things on GitHub like open issues, comment on pull requests, and manage projects. They can also do things outside of GitHub based on events that happen on GitHub. For example, a GitHub App can post on Slack when an issue is opened on GitHub.
During the course of the workshop exercises, you will discover how a GitHub App can be used to perform automatic versioning or creation of releases, such that the performed action effectively raises an event that triggers other workflows.
GitHub Universe 2024 session provision
A GitHub App will be created for your use, and setup to enable you easily access its
private keyandidfrom within the repository you will create for doing the workshop exercises.🧐 What is the use of a GitHub App in this workshop?
Using the
GITHUB_TOKENthat is available to workflows by default for authorization, it is possible to interact with the GitHub platform via API calls. However, there is a caveat...When you use the repository's
GITHUB_TOKENto perform tasks, events triggered by theGITHUB_TOKEN, with the exception ofworkflow_dispatchandrepository_dispatch, will not create a new workflow run. This prevents you from accidentally creating recursive workflow runs. For example, if a workflow run pushes code using the repository'sGITHUB_TOKEN, a new workflow will not run even when the repository contains a workflow configured to run when push events occur.If you do want to trigger a workflow from within a workflow run, you can use a GitHub App installation access token or a personal access token instead of
GITHUB_TOKENto trigger events that require a token.If you use a GitHub App, you'll need to create a GitHub App and store the app ID and private key as secrets.