Skip to content

Commit a3df690

Browse files
jparrillavishayt
andauthored
MGMT-1990 Added MVP files to showcast them in oredr to continue or stop the work on this line. (openshift#368)
Co-authored-by: Avishay Traeger <[email protected]>
1 parent e0ba26f commit a3df690

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+9377
-17
lines changed

Dockerfile.assisted-service-build

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ RUN go get -u github.com/onsi/ginkgo/[email protected] \
1212
gotest.tools/[email protected] \
1313
github.com/axw/gocov/gocov \
1414
github.com/AlekSi/[email protected]
15-
RUN pip3 install boto3==1.13.14 waiting==1.4.1 requests==2.22.0
15+
RUN pip3 install boto3==1.13.14 waiting==1.4.1 requests==2.22.0 mkdocs==1.1.2
1616
RUN curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.10.1/minikube-linux-amd64 \
1717
&& chmod +x minikube && mkdir -p /usr/local/bin/ && install minikube /usr/local/bin/
1818
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl && chmod +x ./kubectl && mv ./kubectl /usr/local/bin/kubectl
19+

Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ generate-keys: $(BUILD_FOLDER)
113113
# Build & Update #
114114
##################
115115

116-
.PHONY: build
116+
.PHONY: build docs
117117
build: lint unit-test build-minimal build-iso-generator
118118

119119
build-all: build-image build-minimal-assisted-iso-generator-image
@@ -241,6 +241,12 @@ deploy-onprem:
241241
deploy-onprem-for-subsystem:
242242
export DUMMY_IGNITION="true" && $(MAKE) deploy-onprem
243243

244+
docs:
245+
mkdocs build
246+
247+
docs_serve:
248+
mkdocs serve
249+
244250
########
245251
# Test #
246252
########

README.md

+33-15
Original file line numberDiff line numberDiff line change
@@ -156,26 +156,26 @@ This will allow you to deploy Prometheus and Grafana already integrated with Ass
156156

157157
- On Minikube
158158

159-
```shell
160-
# Step by step
161-
make deploy-olm
162-
make deploy-prometheus
163-
make deploy-grafana
159+
```shell
160+
# Step by step
161+
make deploy-olm
162+
make deploy-prometheus
163+
make deploy-grafana
164164

165-
# Or just all-in
166-
make deploy-monitoring
167-
```
165+
# Or just all-in
166+
make deploy-monitoring
167+
```
168168

169169
- On Openshift
170170

171-
```shell
172-
# Step by step
173-
make deploy-prometheus TARGET=oc-ingress APPLY_NAMESPACE=false
174-
make deploy-grafana TARGET=oc-ingress APPLY_NAMESPACE=false
171+
```shell
172+
# Step by step
173+
make deploy-prometheus TARGET=oc-ingress APPLY_NAMESPACE=false
174+
make deploy-grafana TARGET=oc-ingress APPLY_NAMESPACE=false
175175

176-
# Or just all-in
177-
make deploy-monitoring TARGET=oc-ingress APPLY_NAMESPACE=false
178-
```
176+
# Or just all-in
177+
make deploy-monitoring TARGET=oc-ingress APPLY_NAMESPACE=false
178+
```
179179

180180
NOTE: To expose the monitoring UI's on your local environment you could follow these steps
181181

@@ -278,6 +278,24 @@ allowing it to be effective most of the time.
278278

279279
A document that can assist troubleshooting: [link](https://docs.google.com/document/d/1WDc5LQjNnqpznM9YFTGb9Bg1kqPVckgGepS4KBxGSqw)
280280

281+
## Documentation
282+
283+
To rebuild the site after adding some documentation to the Markdown files, you just need to execute this Make target before the push
284+
285+
```shell
286+
make docs
287+
```
288+
289+
To validate the documentation generated, go to the root of the repo and execute
290+
291+
```shell
292+
make docs_serve
293+
```
294+
295+
After that, you just need to access to [127.0.0.1:8000](http://127.0.0.1:8000/) on your browser and check the new content.
296+
297+
_NOTE: To use these features, you need to have mkdocs installed in your system, to do that you just need to execute this command `pip3 install --user mkdocs`_
298+
281299
## Linked repositories
282300
* #### coreos_installation_iso:
283301
https://github.com/oshercc/coreos_installation_iso

docs/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# How to deploy OAS on OpenShift
2+
3+
Besides default minikube deployment, the service support deployment to OpenShift cluster using ingress as the access point to the service.
4+
5+
```shell
6+
make deploy-all TARGET=oc-ingress
7+
```
8+
9+
This deployment option have multiple optional parameters that should be used in case you are not the Admin of the cluster:
10+
1. `APPLY_NAMESPACE` - True by default. Will try to deploy "assisted-installer" namespace, if you are not the Admin of the cluster or maybe you don't have permissions for this operation you may skip namespace deployment.
11+
1. `INGRESS_DOMAIN` - By default deployment script will try to get the domain prefix from OpenShift ingress controller. If you don't have access to it then you may specify the domain yourself. For example: `apps.ocp.prod.psi.redhat.com`
12+
13+
To set the parameters simply add them in the end of the command, for example
14+
15+
```shell
16+
make deploy-all TARGET=oc-ingress APPLY_NAMESPACE=False INGRESS_DOMAIN=apps.ocp.prod.psi.redhat.com
17+
```
18+
19+
_**Note**: All deployment configurations are under the `deploy` directory in case more detailed configuration is required._
20+
21+
22+
## Deploying the UI
23+
24+
This service support optional UI deployment.
25+
26+
```shell
27+
make deploy-ui TARGET=oc-ingress
28+
```
29+
30+
## Deploy Monitoring
31+
32+
This will allow you to deploy Prometheus and Grafana already integrated with Assisted installer:
33+
34+
```shell
35+
# Step by step
36+
make deploy-prometheus TARGET=oc-ingress APPLY_NAMESPACE=false
37+
make deploy-grafana TARGET=oc-ingress APPLY_NAMESPACE=false
38+
39+
# Or just all-in
40+
make deploy-monitoring TARGET=oc-ingress APPLY_NAMESPACE=false
41+
```

docs/user-guide/deploy-on-OSP.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Openshift deployment with OAS - On Openstack
2+
work in progress...

docs/user-guide/deploy-on-RHEV.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Openshift deployment with OAS - On RHEV/oVirt
2+
work in progress...
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Openshift deployment with OAS - On Bare Metal
2+
work in progress...

docs/user-guide/deploy-on-local.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Openshift deployment with OAS - On Local
2+
work in progress...

docs/user-guide/deploy-on-vsphere.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Openshift deployment with OAS - On vSphere
2+
work in progress...

docs/user-guide/user-guide.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# User Guide
2+
3+
Welcome to the Openshift Assisted Service User Guide.
4+
5+
Here we will look for the best way to help you deploying Openshift 4 in the provider you desire.
6+
7+
- [OCP Deployment on Local](deploy-on-local.md)
8+
- [OCP Deployment on Bare Metal](deploy-on-bare-metal.md)
9+
- [OCP Deployment on vSphere](deploy-on-vsphere.md)
10+
- [OCP Deployment on RHEV](deploy-on-RHEV.md)
11+
- [OCP Deployment on Openstack](deploy-on-OSP.md)

mkdocs.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
repo_url: https://github.com/openshift/assisted-service
2+
site_name: 'Openshift Assisted Service'
3+
site_description: 'Helper Assistant to deploy and manage your OCP Clusters'
4+
site_author: Openshift Assisted Service Team
5+
theme: readthedocs
6+
edit_uri: ""
7+
nav:
8+
- OAS Home: 'index.md'
9+
- OAS Deployment:
10+
- OAS Running on Local: 'user-guide/assisted-service-on-local.md'
11+
- OAS Running on Openshift: 'user-guide/assisted-service-on-openshift.md'
12+
- Openshift Deployment:
13+
- User Guide Index: 'user-guide/user-guide.md'
14+
- OCP Deployment on Local: 'user-guide/deploy-on-local.md'
15+
- OCP Deployment on Bare Metal: 'user-guide/deploy-on-bare-metal.md'
16+
- OCP Deployment on vSphere: 'user-guide/deploy-on-vsphere.md'
17+
- OCP Deployment on RHEV: 'user-guide/deploy-on-RHEV.md'
18+
- OCP Deployment on Openstack: 'user-guide/deploy-on-OSP.md'
19+

0 commit comments

Comments
 (0)