|
1 | | -## Local Development/Installation instructions |
| 1 | +# **How to Contribute to DevOps Security** |
| 2 | +> ℹ️ **This page is under development** |
2 | 3 |
|
3 | | -Step-by-step instructions help new contributors get a development environment up and running quickly. |
4 | | -2. You'll want to find the balance between being specific enough for novices to follow, without being so specific that you reinvent the wheel by providing overly-basic instructions that can be found elsewhere. |
5 | | -3. Feel free to adapt this section and its sub-sections to your own processes. |
6 | | -4. Alternatively, you can move everything from *Installation instructions* through *Testing* to a separate **Contributing.md** file to keep your **ReadMe.md** more succinct. |
| 4 | +Below are guidelines for contributing to the devops-security repository hosted on GitHub. These guidelines are primarily recommendations rather than strict rules. Use your discretion and feel free to suggest changes to this document by submitting a pull request. |
7 | 5 |
|
| 6 | +**This guide assumes that you have finished the onboarding process, which involves joining the Hack for LA Slack, GitHub, and Google Drive. If you haven't completed onboarding yet, please visit the [Getting Started Page](https://www.hackforla.org/getting-started).** |
8 | 7 |
|
9 | | -### Working with issues |
| 8 | +**The team recommends using [VS Code](https://code.visualstudio.com/download) as the preferred text editor for working on code, but feel free to utilize a text editor of your preference.** |
10 | 9 |
|
11 | | -- Explain how to contribute to an existing issue. |
| 10 | +**If you have any additional questions about your contribution process, please feel free to reach out to the team in the [#ops](https://hackforla.slack.com/archives/CV7QGL66B) Slack channel.** |
| 11 | +<br><br> |
12 | 12 |
|
13 | | -### Working with forks and branches |
| 13 | +## **Table of Contents** |
| 14 | +- [**How to Contribute to DevOps**](#how-to-contribute-to-devops) |
| 15 | +- [**Table of Contents**](#table-of-contents) |
| 16 | +- [**Setting up the local development environment**](#setting-up-the-local-development-environment) |
| 17 | + - [**Creating a personal AWS account**](#creating-a-personal-aws-account) |
| 18 | + - [**Installing Terraform**](#installing-terraform) |
| 19 | + - [**Installing Terraform docs**](#installing-terraform-docs) |
| 20 | + - [**Fork the repository**](#fork-the-repository) |
| 21 | + - [**Clone (Create) a copy on your computer**](#clone-create-a-copy-on-your-computer) |
| 22 | + - [**Verify `origin` remote url**](#verify-origin-remote-url) |
| 23 | + - [**What if you accidentally cloned using the repository URL from the HackForLA Github (instead of the fork on your Github)?**](#what-if-you-accidentally-cloned-using-the-repository-url-from-the-hackforla-github-instead-of-the-fork-on-your-github) |
| 24 | + - [**i. Reset `origin` remote url**](#i-reset-origin-remote-url) |
| 25 | + - [**ii. Add an `upstream` remote**](#ii-add-an-upstream-remote) |
14 | 26 |
|
15 | | -- Explain your guidelines here. |
| 27 | +## **Setting up the local development environment** |
16 | 28 |
|
| 29 | +### **Creating a personal AWS account** |
17 | 30 |
|
18 | | -### Working with pull requests and reviews |
| 31 | +- Go to [amazon.com](https://aws.amazon.com/) and click `"Sign In to the Console" > "Create a new AWS account."` |
| 32 | +- Enter your email, create a password, and input your basic details. Then provide your contact information and complete the identity verification process. |
| 33 | +- Enter your credit/debit card information for billing purposes, opt for the free basic support. |
| 34 | +- Agree to the AWS Customer Agreement and Service Terms, complete the registration by clicking `"Create Account and Continue"`, verify your phone number via text or call, confirm your email address following the instructions in the confirmation email, and finally sign in to access your new AWS account using your email and password. |
| 35 | +- Follow this [video guide](https://youtu.be/CjKhQoYeR4Q?si=78GhlDLV5zZu8qwh) for deeper explanations. |
19 | 36 |
|
20 | | -- Explain your process. |
| 37 | +<sub>[Back to Table of Contents](#table-of-contents)</sub> |
| 38 | +*** |
| 39 | + |
| 40 | +### **Installing Terraform** |
| 41 | + |
| 42 | +Use the [Official HashiCorp install instructions](https://developer.hashicorp.com/terraform/install) for installing terraform. |
| 43 | + |
| 44 | +<sub>[Back to Table of Contents](#table-of-contents)</sub> |
| 45 | +*** |
| 46 | + |
| 47 | +### **Installing Terraform docs** |
| 48 | + |
| 49 | +Follow the Terraform docs [installation guide](https://terraform-docs.io/user-guide/installation/) |
| 50 | + |
| 51 | +<sub>[Back to Table of Contents](#table-of-contents)</sub> |
| 52 | +*** |
| 53 | + |
| 54 | +## **Fork the repository** |
| 55 | + |
| 56 | +Fork the hackforla/devops-security repository by clicking <a href="https://github.com/hackforla/devops-security/fork"> <button> <img src="https://user-images.githubusercontent.com/17777237/54873012-40fa5b00-4dd6-11e9-98e0-cc436426c720.png" width="8px"> Fork</button></a> |
| 57 | +. A fork is a copy of the repository that will be placed on your GitHub account. |
| 58 | + |
| 59 | +<details> |
| 60 | + <summary><strong>Click here</strong> to see a visual example of the `fork` button within the devops-security repo</summary> |
| 61 | + <p><strong>First, you find the `fork` button on the top right hand side of the [Hack for LA devops-security repo](https://github.com/hackforla/devops-security)</strong></h4> |
| 62 | +<img src="https://github.com/freaky4wrld/devops-security/assets/134206855/ff3bbadb-5798-4f37-ad3f-b9f699595381" /> |
| 63 | + <p><strong>Next, a modal may open and request where you want to fork this devops-security repo. Please click on your avatar or your GitHub username</strong></p> |
| 64 | +<img src="https://github.com/freaky4wrld/devops-security/assets/134206855/db7a0ca9-3dee-429e-a5eb-115248a52884" /> |
| 65 | +</details><br> |
| 66 | + |
| 67 | +**Note:** It should create a URL that looks like the following -> `https://github.com/<your_GitHub_user_name>/devops-security`. |
| 68 | + |
| 69 | +**For example** -> `https://github.com/octocat/devops-security`. |
| 70 | + |
| 71 | +**Be Aware:** What you have created is a forked copy in a remote version on GitHub. It is not yet on your local machine. |
| 72 | + |
| 73 | +<sub>[Back to Table of Contents](#table-of-contents)</sub> |
| 74 | +*** |
| 75 | + |
| 76 | +## **Clone (Create) a copy on your computer** |
| 77 | + |
| 78 | +Create a new folder in your computer that will contain `hackforla` projects. |
| 79 | + |
| 80 | +In your command line interface (Terminal, Git Bash, Powershell), move to where you want your new folder to be placed and create a new folder in your computer that will contain `hackforla` projects. After that, navigate into the folder(directory) you just created. |
| 81 | + |
| 82 | +For example: |
| 83 | +```bash |
| 84 | +mkdir hackforla |
| 85 | +cd hackforla |
| 86 | +``` |
| 87 | + |
| 88 | +and run the following commands: |
| 89 | + |
| 90 | +```bash |
| 91 | +git clone https://github.com/<your_GitHub_user_name>/devops-security.git |
| 92 | +``` |
| 93 | + |
| 94 | +For example if your GitHub username was `octocat`: |
| 95 | +```bash |
| 96 | +git clone https://github.com/octocat/devops-security.git |
| 97 | +``` |
| 98 | + |
| 99 | +You should now have a new folder in your `hackforla` folder called `devops-security`. Verify this by changing into the new directory: |
| 100 | + |
| 101 | +```bash |
| 102 | +cd devops-security |
| 103 | +``` |
| 104 | + |
| 105 | +#### **Verify `origin` remote url** |
| 106 | + |
| 107 | +Verify that your local cloned repository is pointing to the correct `origin` URL (that is, the forked repo on your own Github account): |
| 108 | +```bash |
| 109 | +git remote -v |
| 110 | +``` |
| 111 | +You should see `fetch` and `push` URLs with links to your forked repository under your account (i.e. `https://github.com/<your_GitHub_user_name>/devops-security.git`). You are all set to make working changes to the devops-security on your local machine. |
| 112 | + |
| 113 | +However, we still need a way to keep our local repo up to date with the deployed devops-security. To do so, you must add an upstream remote to incorporate changes made while you are working on your local repo. Run the following to add an upstream remote URL & update your local repo with recent changes to the `hackforla` version: |
| 114 | + |
| 115 | +```bash |
| 116 | +git remote add upstream https://github.com/hackforla/devops-security.git |
| 117 | +git fetch upstream |
| 118 | +``` |
| 119 | + |
| 120 | +After adding the upstream remote, you should now see it if you again run `git remote -v` : |
| 121 | +```bash |
| 122 | +origin https://github.com/<your_GitHub_user_name>/devops-security.git (fetch) |
| 123 | +origin https://github.com/<your_GitHub_user_name>/devops-security.git (push) |
| 124 | +upstream https://github.com/hackforla/devops-security.git (fetch) |
| 125 | +upstream https://github.com/hackforla/devops-security.git (push) |
| 126 | +``` |
| 127 | +#### **What if you accidentally cloned using the repository URL from the HackForLA Github (instead of the fork on your Github)?** |
| 128 | + |
| 129 | +##### **i. Reset `origin` remote url** |
| 130 | + |
| 131 | +Set your forked repo on your Github as an `origin` remote: |
| 132 | +```bash |
| 133 | +git remote set-url origin https://github.com/<your_GitHub_user_name>/devops-security.git |
| 134 | +``` |
| 135 | + |
| 136 | +For example if your GitHub username was `octocat`: |
| 137 | +```bash |
| 138 | +git remote set-url origin https://github.com/octocat/devops-security.git |
| 139 | +``` |
| 140 | + |
| 141 | +##### **ii. Add an `upstream` remote** |
| 142 | + |
| 143 | +Add another remote called `upstream` that points to the `hackforla` version of the repository. This will allow you to incorporate changes later: |
| 144 | +```bash |
| 145 | +git remote add upstream https://github.com/hackforla/devops-security.git |
| 146 | +``` |
| 147 | + |
| 148 | +<sub>[Back to Table of Contents](#table-of-contents)</sub> |
| 149 | +*** |
0 commit comments