Remove manual Network Policy creation step from all.md

This commit is contained in:
John Skiles Skinner
2024-07-25 19:40:10 -07:00
parent 74d0b40e16
commit 9ee7959211

View File

@@ -438,6 +438,8 @@ Rules for use:
If this is the first time you have used Terraform in this repository, you will first have to hook your copy of Terraform up to our remote state. Follow [Retrieving existing bucket credentials](https://github.com/GSA/notifications-api/tree/main/terraform#retrieving-existing-bucket-credentials). If this is the first time you have used Terraform in this repository, you will first have to hook your copy of Terraform up to our remote state. Follow [Retrieving existing bucket credentials](https://github.com/GSA/notifications-api/tree/main/terraform#retrieving-existing-bucket-credentials).
:anchor: The Admin app depends upon the API app, so set up the API first.
1. Set up services: 1. Set up services:
```bash ```bash
$ cd terraform/sandbox $ cd terraform/sandbox
@@ -448,7 +450,7 @@ If this is the first time you have used Terraform in this repository, you will f
``` ```
Check [Terraform troubleshooting](https://github.com/GSA/notifications-api/tree/main/terraform#troubleshooting) if you encounter problems. Check [Terraform troubleshooting](https://github.com/GSA/notifications-api/tree/main/terraform#troubleshooting) if you encounter problems.
1. Change back to the project root directory: `cd ../..` 1. Change back to the project root directory: `cd ../..`
1. Start a poetry shell as a shortcut to load `.env` file variables by running `poetry shell` 1. Start a poetry shell as a shortcut to load `.env` file variables by running `poetry shell`. (You'll have to restart this any time you change the file.)
1. Output requirements.txt file: `poetry export --without-hashes --format=requirements.txt > requirements.txt` 1. Output requirements.txt file: `poetry export --without-hashes --format=requirements.txt > requirements.txt`
1. Ensure you are using the correct CloudFoundry target 1. Ensure you are using the correct CloudFoundry target
```bash ```bash
@@ -459,11 +461,7 @@ If this is the first time you have used Terraform in this repository, you will f
cf push --vars-file deploy-config/sandbox.yml --var NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY cf push --vars-file deploy-config/sandbox.yml --var NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY
``` ```
The real `push` command has more var arguments than the single one above. Get their values from a Notify team member. The real `push` command has more var arguments than the single one above. Get their values from a Notify team member.
1. If you are setting up both our API app and our [Admin app](https://github.com/GSA/notifications-admin) in the sandbox, run this to allow the two apps to communicate with each other:
```bash
cf add-network-policy notify-admin-sandbox notify-api-sandbox --protocol tcp --port 61443
```
Check [API request failed](#api-request-failed) for problems.
1. Visit the URL(s) of the app you just deployed 1. Visit the URL(s) of the app you just deployed
* Admin https://notify-sandbox.app.cloud.gov/ * Admin https://notify-sandbox.app.cloud.gov/
* API https://notify-api-sandbox.app.cloud.gov/ * API https://notify-api-sandbox.app.cloud.gov/
@@ -1408,7 +1406,11 @@ And you would also see this in the Admin web UI
Sorry, we can't deliver what you asked for right now. Sorry, we can't deliver what you asked for right now.
``` ```
This indicates that the Admin and API apps are unable to talk to each other because of either a missing route or a missing network policy. The apps require [container-to-container networking](https://cloud.gov/docs/management/container-to-container/) to communicate. List `cf network-policies` and compare the output to our other deployed envs. If you find a policy is missing, you may not have created the correct Network Policy. See the command in [Deploying to the sandbox](#deploying-to-the-sandbox). This indicates that the Admin and API apps are unable to talk to each other because of either a missing route or a missing network policy. The apps require [container-to-container networking](https://cloud.gov/docs/management/container-to-container/) to communicate. List `cf network-policies`; you should see one connecting API and Admin on port 61443. If not, you can create one manually:
```bash
cf add-network-policy notify-admin-sandbox notify-api-sandbox --protocol tcp --port 61443
```
### Service instance not found ### Service instance not found