|
1 | 1 | # Jit Customer Scripts README |
2 | 2 |
|
3 | 3 | The README provided is an extensive guide on how to use the `jit-customer-scripts` project. \ |
4 | | -The Makefile described is composed of commands that ease the installation, configuration, and running of the scripts within the project. \ |
| 4 | +The Makefile described is composed of commands that ease the installation, configuration, and running of the scripts |
| 5 | +within the project. \ |
5 | 6 | Here's a breakdown of the provided README and Makefile: |
6 | 7 |
|
7 | 8 | ## README Overview |
8 | 9 |
|
9 | | -- **Introduction**: The README begins with a brief description of the project and its purpose, which is to aid customers in creating teams and updating assets based on a given JSON file. |
| 10 | +- **Introduction**: The README begins with a brief description of the project and its purpose, which is to aid customers |
| 11 | + in creating teams and updating assets based on a given JSON file. |
10 | 12 | - **Project Structure**: An organized visual representation of the project's file structure is provided. |
11 | | -- **Prerequisites**: Lists necessary software that should be installed before starting, along with instructions for CentOS and Ubuntu to prepare the environment. |
| 13 | +- **Prerequisites**: Lists necessary software that should be installed before starting, along with instructions for |
| 14 | + CentOS and Ubuntu to prepare the environment. |
12 | 15 | - **Generating API Keys**: Guidance on how to generate the necessary Github Personal Access Token and Jit API Key. |
13 | 16 | - **Installation**: Steps on cloning the repository and setting up the project. |
14 | 17 | - **Configuration**: Instructions on how to configure the necessary environment variables for the script. |
15 | 18 | - **Usage**: |
16 | | - - **Creating Teams from Github Topics**: Details on how to use the script to create teams and update assets from GitHub topics. |
17 | | - - **Using External JSON File**: Allows users to directly provide a JSON file containing team details. |
18 | | - - **Excluding Topics**: Instructions on excluding specific topics when creating teams. |
19 | | - - **Setting Up Self-Hosted Runners**: Guidance on setting up GitHub self-hosted runners on both CentOS and Ubuntu. |
20 | | - - **Help**: Instruction on getting help with the Makefile commands. |
21 | | - - **Development**: A small note about overriding the Jit API endpoint. |
| 19 | + - **Creating Teams from Github Topics**: Details on how to use the script to create teams and update assets from |
| 20 | + GitHub topics. |
| 21 | + - **Using External JSON File**: Allows users to directly provide a JSON file containing team details. |
| 22 | + - **Excluding Topics**: Instructions on excluding specific topics when creating teams. |
| 23 | + - **Setting Up Self-Hosted Runners**: Guidance on setting up GitHub self-hosted runners on both CentOS and Ubuntu. |
| 24 | + - **Help**: Instruction on getting help with the Makefile commands. |
| 25 | + - **Development**: A small note about overriding the Jit API endpoint. |
22 | 26 |
|
23 | 27 | ## Makefile Overview |
24 | 28 |
|
25 | | -The Makefile consists of several targets to facilitate the installation, configuration, and running of scripts. Here's a breakdown: |
| 29 | +The Makefile consists of several targets to facilitate the installation, configuration, and running of scripts. Here's a |
| 30 | +breakdown: |
26 | 31 |
|
27 | 32 | ### sync-teams |
| 33 | + |
28 | 34 | This target has three sub-targets: |
| 35 | + |
29 | 36 | - `install`: Ensures Python 3 is installed, sets up a virtual environment, and installs the required dependencies. |
30 | | -- `configure`: Prompts the user to input configuration details like GitHub organization name, API client ID, client secret, and GitHub token. The responses are written to a `.env` file. |
| 37 | +- `configure`: Prompts the user to input configuration details like GitHub organization name, API client ID, client |
| 38 | + secret, and GitHub token. The responses are written to a `.env` file. |
31 | 39 | - `run`: Activates the virtual environment and runs two Python scripts in succession to generate teams. |
32 | 40 |
|
33 | 41 | ### self-hosted-runner |
| 42 | + |
34 | 43 | This target and its sub-targets facilitate setting up a GitHub self-hosted runner: |
| 44 | + |
35 | 45 | - `check-root`: Ensures the script isn't run as root. |
36 | 46 | - `setup-runner`: Checks the platform (CentOS or Ubuntu) and runs the appropriate setup script. |
37 | 47 | - `install-agent`: Installs the GitHub runner agent. |
38 | 48 |
|
39 | 49 | ### Help |
| 50 | + |
40 | 51 | - `help`: Displays available targets and their brief descriptions. |
41 | 52 |
|
42 | 53 | ## Hierarchical Structure of the Commands: |
43 | 54 |
|
44 | 55 | 1. **sync-teams** |
45 | | - - install |
46 | | - - configure |
47 | | - - run |
| 56 | + - install |
| 57 | + - configure |
| 58 | + - run |
48 | 59 |
|
49 | 60 | 2. **self-hosted-runner** |
50 | | - - centos |
51 | | - - ubuntu |
| 61 | + - centos |
| 62 | + - ubuntu |
52 | 63 |
|
53 | 64 | ## Project Structure |
54 | 65 |
|
@@ -79,14 +90,12 @@ jit-customer-scripts/ |
79 | 90 | - `Makefile`: Provides commands to help with project setup and execution. |
80 | 91 | - `README.md`: This file. |
81 | 92 |
|
82 | | - |
83 | 93 | ## Prerequisites |
84 | 94 |
|
85 | 95 | - Python 3.x |
86 | 96 | - Git |
87 | 97 | - make |
88 | 98 |
|
89 | | - |
90 | 99 | To make sure you have all you can run this command: |
91 | 100 |
|
92 | 101 | #### Centos |
@@ -215,7 +224,6 @@ This will exclude topics with names like "test", "test123", and "abc-testing". |
215 | 224 | To override Jit's API endpoint, you can set the `JIT_API_ENDPOINT` environment variable. If the variable is not set, the |
216 | 225 | default value will be used. |
217 | 226 |
|
218 | | - |
219 | 227 | ## Settings Up Self-Hosted Runners |
220 | 228 |
|
221 | 229 | To setup self-hosted runners, use the following command: |
@@ -253,4 +261,4 @@ To see the available commands and their descriptions, use the following command: |
253 | 261 |
|
254 | 262 | ```shell |
255 | 263 | make help |
256 | | -``` |
| 264 | +``` |
0 commit comments