|
| 1 | +# Running OpenShift Assisted Service (OAS) on local machine |
| 2 | + |
| 3 | +For that we have some ways we could follow, let's take a look on some of them. |
| 4 | + |
| 5 | +## Running OAS on Minikube |
| 6 | + |
| 7 | +This is the easiest way to deploy OAS, there are some Make targets to do that, but firstly we need Minikube: |
| 8 | + |
| 9 | +```shell |
| 10 | +minikube start --driver=kvm2 |
| 11 | +skipper make deploy-all |
| 12 | +skipper make deploy-ui |
| 13 | +``` |
| 14 | + |
| 15 | +You could use `kubectl proxy` command to expose the Assisted Service UI for external access purpose |
| 16 | + |
| 17 | +## Running OAS on Podman |
| 18 | + |
| 19 | +The assisted service can also be deployed without using a Kubernetes cluster. In this scenario the service and associated components are deployed onto your local host as a pod using Podman. |
| 20 | + |
| 21 | +This type of deployment requires a different container image that combines components that are used to generate the installer ISO and configuration files. First build the image: |
| 22 | + |
| 23 | +``` |
| 24 | +export SERVICE=quay.io/<your-org>/assisted-service:latest |
| 25 | +make build-onprem |
| 26 | +``` |
| 27 | + |
| 28 | +To deploy, update SERVICE_BASE_URL in the onprem-environment file to match the hostname or IP address of your host. For example if your IP address is 192.168.122.2, then the SERVICE_BASE_URL would be set to http://192.168.122.2:8090. Port 8090 is the assisted-service API. |
| 29 | + |
| 30 | +Then deploy the containers: |
| 31 | + |
| 32 | +``` |
| 33 | +make deploy-onprem |
| 34 | +``` |
| 35 | + |
| 36 | +Check all containers are up and running: |
| 37 | + |
| 38 | +``` |
| 39 | +podman ps -a |
| 40 | +``` |
| 41 | + |
| 42 | +The UI will available at: |
| 43 | + |
| 44 | +``` |
| 45 | +http://<host-ip-address>:8080 |
| 46 | +``` |
| 47 | + |
| 48 | +To remove the containers: |
| 49 | + |
| 50 | +``` |
| 51 | +make clean-onprem |
| 52 | +``` |
| 53 | + |
| 54 | +## Running OAS on vanilla K8s |
| 55 | + |
| 56 | +work in progress... |
| 57 | + |
| 58 | +## Running OAS on K3s |
| 59 | + |
| 60 | +work in progress... |
| 61 | + |
| 62 | +## Running OAS on KinD |
| 63 | + |
| 64 | +work in progress... |
| 65 | + |
| 66 | +## Deploying Monitoring service for OAS |
| 67 | + |
| 68 | +This will allow you to deploy Prometheus and Grafana already integrated with Assisted installer: |
| 69 | + |
| 70 | +```shell |
| 71 | +# Step by step |
| 72 | +make deploy-olm |
| 73 | +make deploy-prometheus |
| 74 | +make deploy-grafana |
| 75 | + |
| 76 | +# Or just all-in |
| 77 | +make deploy-monitoring |
| 78 | +``` |
| 79 | + |
| 80 | +NOTE: To expose the monitoring UI's on your local environment you could follow these steps |
| 81 | + |
| 82 | +```shell |
| 83 | +kubectl config set-context $(kubectl config current-context) --namespace assisted-installer |
| 84 | + |
| 85 | +# To expose Prometheus |
| 86 | +kubectl port-forward svc/prometheus-k8s 9090:9090 |
| 87 | + |
| 88 | +# To expose Grafana |
| 89 | +kubectl port-forward svc/grafana 3000:3000 |
| 90 | +``` |
| 91 | + |
| 92 | +Now you just need to access [http://127.0.0.1:3000](http://127.0.0.1:3000) to access to your Grafana deployment or [http://127.0.0.1:9090](http://127.0.0.1:9090) for Prometheus. |
| 93 | + |
| 94 | +## Deploy by tag |
| 95 | + |
| 96 | +This feature is for internal usage and not recommended to use by external users. |
| 97 | +This option will select the required tag that will be used for each dependency. |
| 98 | +If deploy-all use a new tag the update will be done automatically and there is no need to reboot/rollout any deployment. |
| 99 | + |
| 100 | +Deploy images according to the manifest: |
| 101 | +``` |
| 102 | +skipper make deploy-all DEPLOY_MANIFEST_PATH=./assisted-installer.yaml |
| 103 | +``` |
| 104 | + |
| 105 | +Deploy images according to the manifest in the assisted-installer-deployment repo (require git tag/branch/hash): |
| 106 | +``` |
| 107 | +skipper make deploy-all DEPLOY_MANIFEST_TAG=master |
| 108 | +``` |
| 109 | + |
| 110 | +Deploy all the images with the same tag. |
| 111 | +The tag is not validated, so you need to make sure it actually exists. |
| 112 | +``` |
| 113 | +skipper make deploy-all DEPLOY_TAG=<tag> |
| 114 | +``` |
| 115 | + |
| 116 | +Default tag is latest |
0 commit comments