NRO Generation

How to create a new P4 NRO instance

Requirements

Local dependencies

Permissions and repositories

Build the configuration

Get inside the planet-nro-generator repository and follow the instructions on README.md. In a nutsell:

./configure.sh
make run

If you want to create only a Development environment just type false for release and production.

Create the environments

First connect to the development cluster

# get connected to google cloud development cluster:
gcloud container clusters get-credentials p4-development --zone us-central1-a --project planet-4-151612
# Start using the development cluster
kubectl config set-context p4-develop --namespace=develop --cluster=gke_planet-4-151612_us-central1-a_p4-development --user=gke_planet-4-151612_us-central1-a_p4-development
# switch to our own context
kubectl config use-context p4-develop

Get inside the planet-nro-generator repository and follow the instructions on README.md. In a nutsell:

./configure.sh
make

There are two manual steps in this process. Adding a github ssh key to CircleCI and a Google OAuth token. You should get quick links to both of them on the terminal output.

If you are also creating release and production environments you can repeat these steps, after you switch to production cluster. Here is an example for cidev release instance:

# get connected to the google cloud for the production cluster
gcloud container clusters get-credentials planet4-production --zone us-central1-a --project planet4-production
# or if i wanted a specific site context for the release. (replace the "cidev" bellow with your site):
kubectl config set-context planet4-cidev-release --namespace cidev --cluster gke_planet4-production_us-central1-a_planet4-production --user gke_planet4-production_us-central1-a_planet4-production
# switch to that context (replace the "cidev" bellow with your site):
kubectl config use-context planet4-cidev-release