Skip to content

Commit

Permalink
Fixed INSTALLER_PULLSPEC to use correct release version format by tri…
Browse files Browse the repository at this point in the history
…mming minor version from OpenShift version

file has been added
  • Loading branch information
shubhadapaithankar committed Aug 14, 2024
1 parent 1b12497 commit 1046a8d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
40 changes: 22 additions & 18 deletions docs/deploy-development-rp.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
# Deploy development RP

## Why to use it?
This is the **preferred** and fast way to have your own local development RP setup, while also having a functional cluster.
It uses hacks scripts around a lot of the setup to make things easier to bootstrap and be more sensible for running off of your local laptop.

- Check the specific use-case examples where [deploying full RP service](https://github.com/Azure/ARO-RP/blob/master/docs/deploy-full-rp-service-in-dev.md) can be a better match.

## Prerequisites

1. Your development environment is prepared according to the steps outlined in [Prepare Your Dev Environment](./prepare-your-dev-environment.md)

## Installing the extension

1. Build the development `az aro` extension:
1. Check the `env.example` file and copy it by creating your own:

```bash
cp env.example env
```

2. Build the development `az aro` extension:

```bash
. ./env
make az
```

1. Verify the ARO extension is registered:
3. Verify the ARO extension is registered:

```bash
az -v
Expand Down Expand Up @@ -469,46 +481,32 @@ To run fake metrics socket:
```bash
go run ./hack/monitor
```
## Run the RP and create a Hive cluster
### Run the RP and create a Hive cluster

**Steps to perform on Mac**

1. Mount your local MacOS filesystem into the podman machine:
```bash
podman machine init --now --cpus=4 --memory=4096 -v $HOME:$HOME
```

2. Use the openvpn config file (which is now mounted inside the podman machine) to start the VPN connection:

```bash
podman machine ssh
sudo rpm-ostree install openvpn
sudo systemctl reboot
podman machine ssh
sudo openvpn --config /Users/<user_name>/go/src/github.com/Azure/ARO-RP/secrets/vpn-aks-westeurope.ovpn --daemon --writepid vpnpid
ps aux | grep openvpn
```

### Instructions for Modifying Environment File

**Update the env File**

- Open the `env` file.
- Update env file instructions: set `OPENSHIFT_VERSION`, update `INSTALLER_PULLSPEC` and `OCP_PULLSPEC`, mention quay.io for SHA256 hash.
- Update INSTALLER_PULLSPEC with the appropriate name and tag, typically matching the OpenShift version, e.g., `release-4.13.`(for more detail see the `env.example`)

* Source the environment file before creating the cluster using the `setup_resources.sh` script(Added the updated env in the PR)
```bash
cd /hack
./setup_resources.sh
```

* Once the cluster create verify connectivity with the ARO cluster:
- Download the admin kubeconfig file
```bash
Expand All @@ -522,7 +520,6 @@ export KUBECONFIG=~/.kube/aro-admin-kubeconfig
```bash
kubectl get nodes
```

```bash
kubectl get nodes
NAME STATUS ROLES AGE VERSION
Expand All @@ -534,4 +531,11 @@ shpaitha-aro-cluster-4sp5c-worker-westeurope2-j9zrs Ready worker
shpaitha-aro-cluster-4sp5c-worker-westeurope3-56tk7 Ready worker 28m v1.25.11+1485cc9
```

## Troubleshooting

1. Trying to use `az aro` CLI in Production, fails with:
```
(NoRegisteredProviderFound) No registered resource provider found for location '$LOCATION' and API version '2024-08-12-preview'
```
- Check if`~/.azure/config` there is a block `extensions.dev_sources`. If yes, comment it.
- Check if env var `AZURE_EXTENSION_DEV_SOURCES` is set. If yes, unset it.
2 changes: 1 addition & 1 deletion hack/setup_resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ OPENSHIFT_VERSION=$(awk -F'[(,)]' '/NewVersion/ {gsub(/ /, ""); print $2"."$3"."
OCP_PULLSPEC=$(awk -F'"' '/PullSpec:/ {print $2; exit}' "$CONST_GO_PATH")

# Set the INSTALLER_PULLSPEC
INSTALLER_PULLSPEC="arointsvc.azurecr.io/aro-installer:release-$OPENSHIFT_VERSION"
INSTALLER_PULLSPEC="arointsvc.azurecr.io/aro-installer:release-$(echo $OPENSHIFT_VERSION | sed 's/\.[^.]*$//')"
echo "Using OpenShift version: $OPENSHIFT_VERSION"
echo "Using OCP_PULLSPEC: $OCP_PULLSPEC"
echo "Using INSTALLER_PULLSPEC: $INSTALLER_PULLSPEC"
Expand Down

0 comments on commit 1046a8d

Please sign in to comment.