Skip to content

Commit 1d04f22

Browse files
committed
README updatges and cloud specific skupper config
1 parent 893ec72 commit 1d04f22

File tree

9 files changed

+135
-27
lines changed

9 files changed

+135
-27
lines changed

README.adoc

+67-9
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,14 @@ The following table shows the cloud and what components gets installed on each o
3434
[cols="<2,^1,^1,^1", options="header"]
3535
|===
3636
| Component | Cloud-1 | Cloud-2 | Cloud-3
37+
| Cloud Provider | gcp | aws | azr
3738
| Backend | &#x2713; | &#x2713; | &#x2713;
3839
| Frontend | &#x2713; | &#x274C; | &#x274C;
3940
| Generate Site Token(`token.yaml`) | &#x2713; | &#x274C; | &#x274C;
4041
|===
4142

43+
NOTE: You can use any cloud provider for any OpenShift4 supported cloud, the gcp/aws/azr is used in this example.
44+
4245
Before the `backend` or `frontend` applications are deployed, execute the following on *each cloud*:
4346

4447
[source,bash]
@@ -47,10 +50,60 @@ cd $HYBRID_CLOUD_HOME
4750
oc apply -k k8s/core
4851
oc project hybrid-cloud-demo
4952
oc apply -k k8s/rbac
50-
oc apply -k k8s/skupper
5153
----
5254

53-
Wait for skupper deployments to be ready:
55+
=== Cloud-1(gcp)
56+
57+
=== Add Image Streams
58+
59+
[source,bash]
60+
----
61+
oc import-image hybrid-cloud-backend --confirm --all --from quay.io/rhdevelopers/hybrid-cloud-demo-backend
62+
# set local lookup policy
63+
oc set image-lookup hybrid-cloud-backend
64+
oc import-image hybrid-cloud-frontend --confirm --all --from quay.io/rhdevelopers/hybrid-cloud-demo-frontend
65+
# set local lookup policy
66+
oc set image-lookup hybrid-cloud-frontend
67+
----
68+
69+
[source,bash]
70+
----
71+
oc apply -k k8s/skupper/gcp
72+
----
73+
74+
=== Cloud-2(aws)
75+
76+
=== Add Image Streams
77+
78+
[source,bash]
79+
----
80+
oc import-image hybrid-cloud-backend --confirm --all --from quay.io/rhdevelopers/hybrid-cloud-demo-backend
81+
# set local lookup policy
82+
oc set image-lookup hybrid-cloud-backend
83+
----
84+
85+
[source,bash]
86+
----
87+
oc apply -k k8s/skupper/aws
88+
----
89+
90+
=== Cloud-3(azr)
91+
92+
=== Add Image Streams
93+
94+
[source,bash]
95+
----
96+
oc import-image hybrid-cloud-backend --confirm --all --from quay.io/rhdevelopers/hybrid-cloud-demo-backend
97+
# set local lookup policy
98+
oc set image-lookup hybrid-cloud-backend
99+
----
100+
101+
[source,bash]
102+
----
103+
oc apply -k k8s/skupper/azr
104+
----
105+
106+
Run the following commands on *Cloud-1*, *Cloud-2* and *Cloud-3* to wait for skupper deployments to be ready:
54107

55108
[source,bash]
56109
----
@@ -125,25 +178,30 @@ On *Cloud-1*, create the following Kubenretes Secret:
125178

126179
[source,bash]
127180
----
128-
oc create -n hybrid-cloud -f k8s/van/site-token.yaml
181+
skupper connection-token $HYBRID_CLOUD_HOME/token.yaml
129182
----
130183

131-
The skupper controller will update the secret *site-token* with TLS details that will be used in other clouds *Cloud-2* and *Cloud-3* to connect the clouds using _Virtual Application Network(VAN)_.
184+
The `token.yaml` will be used in other clouds *Cloud-2* and *Cloud-3* to connect the clouds using _Virtual Application Network(VAN)_.
132185

133-
Retrieve the site token from *Cloud-1* using:
186+
187+
To connect *Cloud-2* and *Cloud-3* with *Cloud-1*, run the following command on *Cloud-2* and *Cloud-3*:
188+
189+
==== Cloud-2
190+
191+
Make sure the *Cloud-2* starts to spill over after *4* requests in queue:
134192

135193
[source,bash]
136194
----
137-
oc get secret -n hybrid-cloud site-token -o yaml > $HYBRID_CLOUD_HOME/token.yaml
195+
skupper connect --connection-name=cloud-1 --cost 4 $HYBRID_CLOUD_HOME/token.yaml
138196
----
139197

140-
IMPORTANT: You don't need to run the following commands on the *Cloud-1* as it already has the token.
198+
==== Cloud-3
141199

142-
To connect *Cloud-2* and *Cloud-3* with *Cloud-1*, run the following command on *Cloud-2* and *Cloud-3*:
200+
Make sure the *Cloud-3* starts to spill over after *2* requests in queue:
143201

144202
[source,bash]
145203
----
146-
oc create -f $HYBRID_CLOUD_HOME/token.yaml
204+
skupper connect --connection-name=cloud-1 --cost 2 $HYBRID_CLOUD_HOME/token.yaml
147205
----
148206

149207
=== Verify Status

cluster/project/playbook.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# msg: "Test over"
2121

2222
- name: "Hybrid Cloud Demo::Prepare for Play"
23-
hosts: azr
23+
hosts: all
2424
connection: local
2525

2626
vars:
@@ -41,13 +41,13 @@
4141
k8s_auth_api_key: "{{ k8s_auth_results.k8s_auth.api_key }}"
4242

4343
- name: "Hybrid Cloud Demo::Configure, Setup and Deploy"
44-
hosts: azr
44+
hosts: all
4545
connection: local
4646

4747
vars:
4848
ansible_python_interpreter: '{{ ansible_playbook_python }}'
4949
verify_certs: False
50-
install_operators: False
50+
install_operators: True
5151
ocp_version: 4.5.6
5252
download_clients: False
5353
deploy_serverless: True
@@ -57,7 +57,7 @@
5757
argocd_manifests_dir: argocd
5858
# The name of the Argo CD CR - default from kameshsampath.openshift_app_spices is argocd-openshift-oauth
5959
argocd_cr_name: argocd-openshift-oauth
60-
htpasswdidp_name: workshopper
60+
htpasswdidp_name: htpasswdidp
6161
users:
6262
create: True
6363
start: 0

cluster/project/roles/hybrid_cloud_demo/tasks/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- include_tasks: tektoncd_add_tasks.yml
66
tags:
77
- tektoncd
8+
89

910
- include_tasks: argocd_apps.yml
1011
tags:
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33

4-
# Adds namespace to all resources.
5-
namespace: hybrid-cloud-demo
6-
7-
# Adds hybrid-cloud-demo label to all resources.
8-
commonLabels:
9-
app.kubernetes.io/part-of: hybrid-cloud-demo
10-
114
generatorOptions:
125
disableNameSuffixHash: true
136

@@ -21,10 +14,9 @@ configMapGenerator:
2114
- console-password="bugs"
2215
- console-user="bunny"
2316
- edge="false"
24-
- name=hybrid-cloud-skupper
17+
- name=hybrid-cloud-aws
2518
- router-console="true"
2619
- service-controller="true"
2720
- service-sync="true"
28-
29-
resources:
30-
- controller.yaml
21+
bases:
22+
- ../base

k8s/skupper/azr/kustomization.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
generatorOptions:
5+
disableNameSuffixHash: true
6+
7+
configMapGenerator:
8+
- name: skupper-site
9+
behavior: create
10+
literals:
11+
- cluster-local="false"
12+
- console="true"
13+
- console-authentication="openshift"
14+
- console-password="bugs"
15+
- console-user="bunny"
16+
- edge="false"
17+
- name=hybrid-cloud-azr
18+
- router-console="true"
19+
- service-controller="true"
20+
- service-sync="true"
21+
bases:
22+
- ../base

k8s/skupper/controller.yaml k8s/skupper/base/controller.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ spec:
1818
serviceAccountName: skupper-site-controller
1919
containers:
2020
- name: site-controller
21-
image: quay.io/skupper/site-controller:0.3
21+
image: quay.io/gordons/site-controller:0.3.2
2222
env:
2323
- name: WATCH_NAMESPACE
2424
valueFrom:
2525
fieldRef:
2626
fieldPath: metadata.namespace
2727
- name: SKUPPER_SERVICE_CONTROLLER_IMAGE
28-
#value: quay.io/skupper/service-controller:0.3
29-
value: quay.io/gordons/service-controller:0.3.2
28+
value: quay.io/skupper/service-controller:0.3

k8s/skupper/base/kustomization.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
# Adds namespace to all resources.
5+
namespace: hybrid-cloud-demo
6+
7+
# Adds hybrid-cloud-demo label to all resources.
8+
commonLabels:
9+
app.kubernetes.io/part-of: hybrid-cloud-demo
10+
11+
resources:
12+
- controller.yaml

k8s/skupper/gcp/kustomization.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
generatorOptions:
5+
disableNameSuffixHash: true
6+
7+
configMapGenerator:
8+
- name: skupper-site
9+
behavior: create
10+
literals:
11+
- cluster-local="false"
12+
- console="true"
13+
- console-authentication="openshift"
14+
- console-password="bugs"
15+
- console-user="bunny"
16+
- edge="false"
17+
- name=hybrid-cloud-gcp
18+
- router-console="true"
19+
- service-controller="true"
20+
- service-sync="true"
21+
bases:
22+
- ../base

k8s/van/site-token.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ kind: Secret
44
metadata:
55
labels:
66
skupper.io/type: connection-token-request
7+
# only allow 5 outstanding requests, before spillover
8+
skupper.io/cost: "5"
79
name: site-token

0 commit comments

Comments
 (0)