You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a consolidated automation repo for different verified designs customer use case examples using `F5 Nginx`. Users can use this to test a specific use case end to end by using the automation code available in this repo. </br>
4
-
</br>
5
-
**NOTE: To learn about each use case check the devcentral article link provided in each scenario folder README** </br>
6
-
</br>
4
+
Introduction :
5
+
---------------
6
+
This demo guide offers a step-by-step walkthrough for configuring the NGINX Ingress Controller with NGINX App Protect v5 on AWS Cloud, using Terraform scripts to automate the deployment. For more information, refer to the devcentral article: <ComingSoon>
7
7
8
8
9
+
## Getting Started
10
+
9
11
## Prerequisites
10
12
11
-
*[AWS Account](https://aws.amazon.com) - Due to the assets being created, free tier will not work.
12
-
* The F5 NGINX App Protect AMI being used from the [AWS Marketplace](https://aws.amazon.com/marketplace) should be subsribed to your account
13
-
* Please make sure resources like VPC and Elastic IP's are below the threshold limit in that aws region
13
+
*[NGINX Plus with App Protect and NGINX Ingress Controller license](https://www.nginx.com/free-trial-request/)
14
+
*[AWS Account](https://aws.amazon.com) - Due to the assets being created, the free tier will not work.
14
15
*[GitHub Account](https://github.com)
15
16
16
-
## Steps to execute
17
+
## Assets
18
+
19
+
***nap:** NGINX Ingress Controller for Kubernetes with NGINX App Protect (WAF and API Protection)
20
+
***infra:** AWS Infrastructure (VPC, IGW, etc.)
21
+
***eks:** AWS Elastic Kubernetes Service
22
+
***arcadia:** Arcadia Finance test web application and API
23
+
***policy:** NGINX WAF Compiler Docker and Policy
24
+
***S3:** Amazon S3 bucket and IAM role and policy for storage.
25
+
26
+
## Tools
27
+
28
+
***Cloud Provider:** AWS
29
+
***IAC:** Terraform
30
+
***IAC State:** Amazon S3
31
+
***CI/CD:** GitHub Actions
32
+
33
+
34
+
## GitHub Secrets Configuration
35
+
36
+
This workflow requires the following secrets to be configured in your GitHub repository:
37
+
38
+
### Required Secrets
39
+
40
+
| Secret Name | Type | Description | Example Value/Format |
|`AWS_ACCESS_KEY_ID`| Secret | AWS IAM user access key ID with sufficient permissions |`AKIAXXXXXXXXXXXXXXXX`|
43
+
|`AWS_SECRET_ACCESS_KEY`| Secret | Corresponding secret access key for the AWS IAM user | (40-character mixed case string) |
44
+
|`AWS_SESSION_TOKEN`| Secret | Session token for temporary AWS credentials (if using MFA) | (Base64-encoded string) |
45
+
|`NGINX_JWT`| Secret | JSON Web Token for NGINX license authentication |`eyJhbGciOi...` (JWT format) |
46
+
|`NGINX_CRT`| Secret | NGINX Certificate in PKCS#12 format |`api.p12` file contents |
47
+
|`NGINX_KEY`| Secret | Private key for securing HTTPS and verifying SSL/TLS certificates | YourCertificatePasrivatekey|
48
+
49
+
### How to Add Secrets
50
+
51
+
1. Navigate to your GitHub repository
52
+
2. Go to **Settings** → **Secrets and variables** → **Actions**
53
+
3. Click **New repository secret**
54
+
4. Enter the secret name exactly as shown above
55
+
5. Paste the secret value
56
+
6. Click **Add secret**
57
+
58
+
59
+
## Workflow Runs
60
+
61
+
**STEP 1:** Check out a branch for the workflow you wish to run using the following naming convention.
62
+
63
+
**DEPLOY**
64
+
65
+
| Workflow | Branch Name |
66
+
| ------------ | ---------------- |
67
+
| NGINX V5-NIC/NAP Apply| apply-NIC/NAP |
17
68
18
-
1. Clone the repo locally and update AWS credentials like `access keys`, `secret key` and `session token` be in `settings` --> `Secrets` --> `Actions` section <br />
> Note: Above values typically expire in every 12 hours. If you are not using session token please remove this field accordingly in workflow file step name-`configure aws credentials` in all jobs
69
+
70
+
**DESTROY**
71
+
72
+
| Workflow | Branch Name |
73
+
| ------------ | ----------------- |
74
+
| NGINX V5-NIC/NAP Destroy| destroy-NIC/NAP |
21
75
22
-
2. EC2 keys should be updated properly in `settings` --> `Secrets` --> `Actions` section <br />
23
-
> Note: Make sure passwords follow company security standards like alpha numeric, etc. <br />
24
76
25
-
3. EC2 key related pem and pub file should be copied to terraform folder in your use case<br />
26
77
27
-
4. Make sure you have subscribed to the `NGINX App Protect AMI` in AWS account <br />
78
+
**STEP 2:** Rename `infra/terraform.tfvars.examples` to `infra/terraform.tfvars` and add the following data:
79
+
* project_prefix = "Your project identifier name in **lower case** letters only - this will be applied as a prefix to all assets"
80
+
* resource_owner = "Your-name"
81
+
* aws_region = "AWS Region" ex. us-east-1
82
+
* azs = ["us-east-1a", "us-east1b"] - Change to Correct Availability Zones based on selected Region
83
+
* Also update assets boolean value as per your work-flows
28
84
29
-
5. Update your `ENV` variables in `/data/testbed-data.json` file in your use case folder <br />
85
+
**STEP 3:** In the `S3 directory`, inside the `variable.tf` file modify the following data
86
+
* description = "S3 bucket for Terraform remote state storage"
87
+
* default = "your-unique-bucket-name" # Replace with your actual bucket name
88
+
30
89
31
-
6. Install self hosted runner and add it to this repo <br />
90
+
**STEP 4:** Commit and push your build branch to your forked repo
91
+
* Build will run and can be monitored in the GitHub Actions tab and TF Cloud console
32
92
33
-
7. Make sure `awscli`, `kubectl`, `ansible-playbook`, `pytest`, `git` and other required tools are installed in this private custom runner. Refer `requirements.txt` file for more details <br />
34
93
35
-
> Note: Please install and make sure python packages like `pytest-html`, `awscli==1.18.105` and `botocore==1.17.28` are available with their correct versions in runner to avoid failures <br />
94
+
**STEP 5:** Once the pipeline is complete, verify that your assets were deployed or destroyed based on your workflow.
36
95
37
-
8. Go to `Actions` tab and select your article work-flow <br />
96
+
**NOTE:** The autocert process takes time. It may be 5 to 10 minutes before Let's Encrypt has provided the cert.
38
97
39
-
9. Click on `Run Workflow` option and execute it <br />
40
98
41
-
10. Check the CI/CD jobs execution and check the artifacts for more details <br />
42
-
<br />
99
+
## Development
43
100
101
+
Outline any requirements to setup a development environment if someone would like to contribute. You may also link to another file for this information.
44
102
45
103
## Support
46
104
@@ -56,7 +114,7 @@ Please refer to the [F5 DevCentral Community Code of Conduct](code_of_conduct.md
0 commit comments