Commit 8d3bd7b3 authored by Nikos Psaromanolakis's avatar Nikos Psaromanolakis
Browse files

Edit README.md

parent da271f3a
Loading
Loading
Loading
Loading
+8 −13
Changes for src/README.md: 8 added lines, 13 removed lines.
Original line number Diff line number Diff line
@@ -62,16 +62,16 @@ kubectl get crd hyposchedulingmanifests.scheduling.hypo.eu

## 4. Build, push and deploy the scheduler

The image is hosted in the private registry `registry.ubitech.eu`.
The image is hosted in the public registry `labs.etsi.org:5050/osl/hypo/code/addons/ocm-scheduler/hypo-ocm-scheduler:v2`.

### 4a. Build and push the image

> **Skip if the image already exists in the registry** and was built from the current (hypo) code. Check with `docker manifest inspect registry.ubitech.eu/nsit/hypo-ocm-scheduler:v1`.
> **Skip if the image already exists in the registry** and was built from the current (hypo) code. Check with `docker manifest inspect labs.etsi.org:5050/osl/hypo/code/addons/ocm-scheduler/hypo-ocm-scheduler:v2`.

```bash
export IMG=registry.ubitech.eu/nsit/hypo-ocm-scheduler:v1
export IMG=labs.etsi.org:5050/osl/hypo/code/addons/ocm-scheduler/hypo-ocm-scheduler:v2

docker login registry.ubitech.eu
docker login labs.etsi.org:5050/osl/hypo/code/addons/ocm-scheduler
docker build -t $IMG .
docker push $IMG
# or equivalently: make docker-build docker-push IMG=$IMG
@@ -79,23 +79,18 @@ docker push $IMG

> Always use an explicit tag (e.g. `:v1`). Without one, Docker uses `:latest`, and the cluster may keep running a cached old image.

### 4b. Give the cluster access to the private registry
### 4b. Create the namespace

```bash
kubectl create namespace hypo-scheduler-system

kubectl create secret docker-registry ubitech-registry \
  --docker-server=registry.ubitech.eu \
  --docker-username=<USERNAME> \
  --docker-password=<PASSWORD> \
  -n hypo-scheduler-system
```

### 4c. Deploy the scheduler

#### Option A: single manifest (recommended)

`deploy/hypo-ocm-scheduler.yaml` contains everything the scheduler needs: Namespace, CRD, ServiceAccount, RBAC, metrics Service and Deployment. The image (`registry.ubitech.eu/nsit/hypo-ocm-scheduler:v1`) and the pull secret (`ubitech-registry`) are already set.
`deploy/hypo-ocm-scheduler.yaml` contains everything the scheduler needs: Namespace, CRD, ServiceAccount, RBAC, metrics Service and Deployment. The image (`labs.etsi.org:5050/osl/hypo/code/addons/ocm-scheduler/hypo-ocm-scheduler:v2`)  is already set.

```bash
kubectl apply -f deploy/hypo-ocm-scheduler.yaml
@@ -117,12 +112,12 @@ make deploy IMG=$IMG
# Attach the pull secret to the scheduler's service account and restart
kubectl patch serviceaccount hypo-scheduler-controller-manager \
  -n hypo-scheduler-system \
  -p '{"imagePullSecrets":[{"name":"ubitech-registry"}]}'
  -p '{"imagePullSecrets":[]}'

kubectl rollout restart deploy/hypo-scheduler-controller-manager -n hypo-scheduler-system
```

Validate that the `hypo-scheduler-controller-manager` deployment uses the image `registry.ubitech.eu/nsit/hypo-ocm-scheduler:v1`.
Validate that the `hypo-scheduler-controller-manager` deployment uses the image `labs.etsi.org:5050/osl/hypo/code/addons/ocm-scheduler/hypo-ocm-scheduler:v2`.

## 5. Validate the deployment