Skip to content

Commit acd9003

Browse files
authored
asset: updated CONTRIBUTING.md
1 parent 8dc6169 commit acd9003

1 file changed

Lines changed: 138 additions & 11 deletions

File tree

CONTRIBUTING.md

Lines changed: 138 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,147 @@
1-
## Local Development/Installation instructions
1+
# **How to Contribute to DevOps**
22

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.
3+
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.
74

5+
**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).**
86

9-
### Working with issues
7+
**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.**
108

11-
- Explain how to contribute to an existing issue.
9+
**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.**
10+
<br><br>
1211

13-
### Working with forks and branches
12+
## **Table of Contents**
13+
- [**How to Contribute to DevOps**](#how-to-contribute-to-devops)
14+
- [**Table of Contents**](#table-of-contents)
15+
- [**Setting up the local development environment**](#setting-up-the-local-development-environment)
16+
- [**Creating a personal AWS account**](#creating-a-personal-aws-account)
17+
- [**Installing Terraform**](#installing-terraform)
18+
- [**Installing Terraform docs**](#installing-terraform-docs)
19+
- [**Fork the repository**](#fork-the-repository)
20+
- [**Clone (Create) a copy on your computer**](#clone-create-a-copy-on-your-computer)
21+
- [**Verify `origin` remote url**](#verify-origin-remote-url)
22+
- [**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)
23+
- [**i. Reset `origin` remote url**](#i-reset-origin-remote-url)
24+
- [**ii. Add an `upstream` remote**](#ii-add-an-upstream-remote)
1425

15-
- Explain your guidelines here.
26+
## **Setting up the local development environment**
1627

28+
### **Creating a personal AWS account**
1729

18-
### Working with pull requests and reviews
30+
- Go to [amazon.com](https://aws.amazon.com/) and click `"Sign In to the Console" > "Create a new AWS account."`
31+
- Enter your email, create a password, and input your basic details. Then provide your contact information and complete the identity verification process.
32+
- Enter your credit/debit card information for billing purposes, opt for the free basic support.
33+
- 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.
1934

20-
- Explain your process.
35+
<sub>[Back to Table of Contents](#table-of-contents)</sub>
36+
***
37+
38+
### **Installing Terraform**
39+
40+
We are using the [Official HashiCorp install instructions](https://developer.hashicorp.com/terraform/install) for installing terraform.
41+
42+
<sub>[Back to Table of Contents](#table-of-contents)</sub>
43+
***
44+
45+
### **Installing Terraform docs**
46+
47+
Follow the Terraform docs [installation guide](https://terraform-docs.io/user-guide/installation/)
48+
49+
<sub>[Back to Table of Contents](#table-of-contents)</sub>
50+
***
51+
52+
## **Fork the repository**
53+
54+
You can 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>
55+
. A fork is a copy of the repository that will be placed on your GitHub account.
56+
57+
<details>
58+
<summary><strong>Click here</strong> to see a visual example of the `fork` button within the devops-security repo</summary>
59+
<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>
60+
<img src="https://github.com/freaky4wrld/devops-security/assets/134206855/ff3bbadb-5798-4f37-ad3f-b9f699595381" />
61+
<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>
62+
<img src="https://github.com/freaky4wrld/devops-security/assets/134206855/db7a0ca9-3dee-429e-a5eb-115248a52884" />
63+
</details><br>
64+
65+
**Note:** It should create a URL that looks like the following -> `https://github.com/<your_GitHub_user_name>/devops-security`.
66+
67+
**For example** -> `https://github.com/octocat/devops-security`.
68+
69+
**Be Aware:** What you have created is a forked copy in a remote version on GitHub. It is not yet on your local machine.
70+
71+
<sub>[Back to Table of Contents](#table-of-contents)</sub>
72+
***
73+
74+
## **Clone (Create) a copy on your computer**
75+
76+
Create a new folder in your computer that will contain `hackforla` projects.
77+
78+
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.
79+
80+
For example:
81+
```bash
82+
mkdir hackforla
83+
cd hackforla
84+
```
85+
86+
and run the following commands:
87+
88+
```bash
89+
git clone https://github.com/<your_GitHub_user_name>/devops-security.git
90+
```
91+
92+
For example if your GitHub username was `octocat`:
93+
```bash
94+
git clone https://github.com/octocat/devops-security.git
95+
```
96+
97+
You should now have a new folder in your `hackforla` folder called `devops-security`. Verify this by changing into the new directory:
98+
99+
```bash
100+
cd devops-security
101+
```
102+
103+
#### **Verify `origin` remote url**
104+
105+
Verify that your local cloned repository is pointing to the correct `origin` URL (that is, the forked repo on your own Github account):
106+
```bash
107+
git remote -v
108+
```
109+
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.
110+
111+
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:
112+
113+
```bash
114+
git remote add upstream https://github.com/hackforla/devops-security.git
115+
git fetch upstream
116+
```
117+
118+
After adding the upstream remote, you should now see it if you again run `git remote -v` :
119+
```bash
120+
origin https://github.com/<your_GitHub_user_name>/devops-security.git (fetch)
121+
origin https://github.com/<your_GitHub_user_name>/devops-security.git (push)
122+
upstream https://github.com/hackforla/devops-security.git (fetch)
123+
upstream https://github.com/hackforla/devops-security.git (push)
124+
```
125+
#### **What if you accidentally cloned using the repository URL from the HackForLA Github (instead of the fork on your Github)?**
126+
127+
##### **i. Reset `origin` remote url**
128+
129+
Set your forked repo on your Github as an `origin` remote:
130+
```bash
131+
git remote set-url origin https://github.com/<your_GitHub_user_name>/devops-security.git
132+
```
133+
134+
For example if your GitHub username was `octocat`:
135+
```bash
136+
git remote set-url origin https://github.com/octocat/devops-security.git
137+
```
138+
139+
##### **ii. Add an `upstream` remote**
140+
141+
Add another remote called `upstream` that points to the `hackforla` version of the repository. This will allow you to incorporate changes later:
142+
```bash
143+
git remote add upstream https://github.com/hackforla/devops-security.git
144+
```
145+
146+
<sub>[Back to Table of Contents](#table-of-contents)</sub>
147+
***

0 commit comments

Comments
 (0)