|
1 | | -# Running the in Codespaces |
2 | | - |
3 | | -The repository can be configured with a [dev container](https://code.visualstudio.com/docs/remote/create-dev-container) which can be used with Codespaces. The container uses Docker Compose to combine the [Cypress](https://github.com/cypress-io/cypress-docker-images) image for web app dev and [MongoDB](https://www.mongodb.com/compatibility/docker) for the database. |
4 | | - |
5 | | -To run the project in Codespaces: |
6 | | - |
7 | | -1. Copy the **.devcontainer** folder to the root of the repository. |
8 | | -1. Commit and push the changes to GitHub. |
9 | | -1. Open the repository in GitHub, and create a [Codespaces secret](https://docs.github.com/en/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces) to store the MongoDB connection string by: |
10 | | - 1. Selecting **Settings** > **Secrets and variables** > **Codespaces** > **New repository secret**. |
11 | | - 2. Set the name to **MONGODB_URI** |
12 | | - 3. Set the secret to **mongodb://localhost** |
13 | | - 4. Select **Add Secret** |
14 | | -1. Select **Code** to return to the main page for the repository. |
15 | | -1. To launch the repository, select **Code** > **Codespaces** > **Create codespace on main**. |
16 | | -1. After the codespace is loaded, open a new terminal by selecting **Ctl** **`** on your keyboard. |
17 | | -1. In the terminal, run the following to install the packages and start the server: |
18 | | - ```bash |
19 | | - npm install |
20 | | - npm run dev |
21 | | - ``` |
22 | | -1. Open the site by selecting **Open Browser** in the lower right corner of the Codespace window. |
| 1 | +# Modern DevOps with GitHub |
| 2 | + |
| 3 | +[DevOps](https://en.wikipedia.org/wiki/DevOps) is a [portmanteau](https://www.merriam-webster.com/dictionary/portmanteau) of **development** and **operations**. At its core is a desire to bring development practices more inline with operations, and operations practices more inline with development. This fosters better communication and collaboration between teams, breaks down barriers, and gives everyone an investment in ensuring customers are delighted by the software we ship. |
| 4 | + |
| 5 | +This workshop is built to help guide you through some of the most common DevOps tasks on GitHub. You'll explore: |
| 6 | + |
| 7 | +- Managing projects with [GitHub Issues](https://github.com/features/issues) |
| 8 | +- Creating a development environment with [GitHub Codespaces](https://github.com/features/codespaces) |
| 9 | +- Using [GitHub Copilot](https://github.com/features/copilot) as your AI pair programmer |
| 10 | +- Securing the development pipeline with [GitHub Advanced Security](https://github.com/features/security) |
| 11 | +- Automating provisioning and deployment with [GitHub Actions](https://github.com/features/actions) |
| 12 | + |
| 13 | +## Prerequisites |
| 14 | + |
| 15 | +This workshop assumes you are familiar with: |
| 16 | + |
| 17 | +- development, however strong coding skills are not required (solution files are provided). |
| 18 | +- the cloud, and how resources can be hosted by different providers. |
| 19 | + |
| 20 | +## Required resources |
| 21 | + |
| 22 | +To complete this workshop, you will need the following: |
| 23 | + |
| 24 | +- A [GitHub account](https://github.com/join) |
| 25 | +- An [Azure account](https://azure.microsoft.com/en-us/free/) if you wish to deploy your project |
| 26 | + |
| 27 | +### Cloud consumption |
| 28 | + |
| 29 | +This workshop does use both GitHub and (optionally) Azure cloud services. Below is the information you will need about potential costs: |
| 30 | + |
| 31 | +- The GitHub Security and GitHub Actions features used during this workshop are at levels which are free for public repositories. |
| 32 | +- When using GitHub Codespaces, you have 60 free core hours available which will be more than sufficient for most learners. |
| 33 | +- GitHub Copilot does require a subscription, however a [free trial for GitHub Copilot](https://docs.github.com/en/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot) is available. The coding exercise does not require the use of GitHub Copilot. |
| 34 | +- If you choose to deploy to Azure (the last two exercises), there is a cost of around $6 US. This amount is covered by creating a new [Azure account](https://azure.microsoft.com/en-us/free/). |
| 35 | + |
| 36 | +## Getting started |
| 37 | + |
| 38 | +Ready to get started? Let's go! The workshop scenario imagines you as a developer volunteering your time for a pet adoption center. You will work through the process of creating a development environment, creating code, enabling security, automating processes, and optionally deploying the project. |
| 39 | + |
| 40 | +0. [Setup your environment](exercises/0-setup.md) for the workshop |
| 41 | +1. [Enable Code Scanning](exercises/1-code-scanning.md) to ensure new code is secure |
| 42 | +2. [Create an issue](exercises/2-issues.md) to document a feature request |
| 43 | +3. [Create a codespace](exercises/3-codespaces.md) to start writing code |
| 44 | +4. [Implement testing](exercises/4-testing.md) to supplement continuous integration |
| 45 | +5. [Add a new feature](exercises/5-coding.md) to implement the feature |
| 46 | +6. [Use the GitHub flow](exercises/6-github-flow.md) to incorporate changes |
| 47 | + |
| 48 | +If you wish, you can also close out your DevOps learning journey by deploying to the cloud. For purposes of this workshop, Azure is used, however the concepts are applicable to any cloud provider. |
| 49 | + |
| 50 | +> **NOTE:** When deploying to a cloud environment, some charges may be incurred. For this workshop, when deploying to Azure and deleting the resources upon completion of the exercises, the charge should be less than $6 US. |
| 51 | +
|
| 52 | +7. [Add automation](exercises/7-automation.md) to create a deployment environment |
| 53 | +8. [Deploy your project](exercises/8-deployment.md) to publish your project to the cloud |
0 commit comments