-
Install Go 1.13 or later, if you haven't already.
-
Install a supported version of Python, if you don't have one installed already. The
az
client supports Python 2.7 and Python 3.5+. A recent Python 3.x version is recommended. -
Install the
gpgme-devel
package. -
Install the Azure CLI, if you haven't already.
-
Install OpenVPN, if you haven't already.
-
Log in to Azure:
az login
-
Git clone this repository to your local machine:
go get -u github.com/Azure/ARO-RP/... cd ${GOPATH:-$HOME/go}/src/github.com/Azure/ARO-RP
-
Non-Red Hat ARO engineering: if you don't have access to a shared development environment and secrets, follow prepare a shared RP development environment.
-
Place your shared development environment secrets in
secrets
(Red Hat ARO engineering: runmake secrets
). -
Copy, edit (if necessary) and source your environment file. The required environment variable configuration is documented immediately below:
cp env.example env vi env . ./env
- LOCATION: Location of the shared RP development environment (default:
eastus
).
- LOCATION: Location of the shared RP development environment (default:
-
Create your own RP database:
az group deployment create \ -g "$RESOURCEGROUP" \ -n "databases-development-$USER" \ --template-file deploy/databases-development.json \ --parameters \ "databaseAccountName=$COSMOSDB_ACCOUNT" \ "databaseName=$DATABASE_NAME" \ >/dev/null
-
Source your environment file.
. ./env
-
Run the RP
go run ./cmd/aro rp
-
Before creating a cluster, it is necessary to fake up the step of registering the development resource provider to the subscription:
curl -k -X PUT \ -H 'Content-Type: application/json' \ -d '{"state": "Registered", "properties": {"tenantId": "'"$AZURE_TENANT_ID"'"}}' \ "https://localhost:8443/subscriptions/$AZURE_SUBSCRIPTION_ID?api-version=2.0"
-
To create a cluster, follow the instructions in using
az aro
. Note that as long as the RP_MODE environment variable is set to development, theaz aro
client will connect to your local RP. -
The following additional RP endpoints are available but not exposed via
az aro
:-
Delete a subscription, cascading deletion to all its clusters:
curl -k -X PUT \ -H 'Content-Type: application/json' \ -d '{"state": "Deleted", "properties": {"tenantId": "'"$AZURE_TENANT_ID"'"}}' \ "https://localhost:8443/subscriptions/$AZURE_SUBSCRIPTION_ID?api-version=2.0"
-
List operations:
curl -k \ "https://localhost:8443/providers/Microsoft.RedHatOpenShift/operations?api-version=2019-12-31-preview"
-
-
SSH to the bootstrap node:
sudo openvpn secrets/vpn-$LOCATION.ovpn & hack/ssh-bootstrap.sh "/subscriptions/$AZURE_SUBSCRIPTION_ID/resourceGroups/$RESOURCEGROUP/providers/Microsoft.RedHatOpenShift/openShiftClusters/$CLUSTER"
-
Get an admin kubeconfig:
hack/get-admin-kubeconfig.sh "/subscriptions/$AZURE_SUBSCRIPTION_ID/resourceGroups/$RESOURCEGROUP/providers/Microsoft.RedHatOpenShift/openShiftClusters/$CLUSTER" export KUBECONFIG=admin.kubeconfig
-
"SSH" to a cluster node:
- First, get the admin kubeconfig and
export KUBECONFIG
as detailed above.
hack/ssh.sh [aro-master-{0,1,2}]
- First, get the admin kubeconfig and
To run fake metrics socket:
nc -U -l mdm_statsd.socket