Skip to content

Commit 4e8cda6

Browse files
authored
Merge pull request #2 from fgiorgetti/simplified-aap-steps
Updated instructions to use RHSI 2.0 resources
2 parents 9e11d5d + bca66a7 commit 4e8cda6

File tree

1 file changed

+70
-35
lines changed

1 file changed

+70
-35
lines changed

documentation/modules/ROOT/pages/03-demo.adoc

Lines changed: 70 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -13,49 +13,66 @@ In order to reproduce the following solution, you will need the following resour
1313

1414
* Access to a running {ocp} cluster with {aap} operator available through the Operator Hub
1515
* A subscription or trial license for {aap} (running on {ocp} cluster)
16-
* {rhsi} (version 2.x) RPM to be installed at the {rhel} machine (for Third-party Network A)
16+
* {rhsi} (version 2.0) Controller deployment YAMLs for {ocp}
17+
* {rhsi} (version 2.0) RPM to be installed at the {rhel} machine (for Third-party Network A)
1718
* A few virtual machines to be used as third-party servers, with SSH server running
1819
* A machine or a virtual machine with {rhel} to simulate third-party network A, with access to the respective servers
1920
* A Linux machine or virtual machine with Podman version 4+ to simulate third-party network B, with access to the respective servers (optional)
20-
* Install the Skupper CLI version 2.x
21+
* Install the Skupper CLI version 2.0
2122
* The following commands are expected: `kubectl`, `jq`, `awk`, `wget` and `podman`
2223

2324
== Walkthrough
2425

2526
=== Installing the {rhsi} command line tool
2627

27-
You need to install the {rhsi} command line tool in order to generate AccessTokens to the connect your third-party
28+
You need to install the {rhsi} command line tool in order to generate AccessTokens to connect your third-party
2829
network sites with {rhsi} running in the cloud.
2930

3031
[.console-input]
3132
[source,shell script]
3233
----
33-
curl https://skupper.io/install.sh | sh -s -- --version 2.0.0-preview-1
34+
dnf config-manager --set-enabled service-interconnect-2-for-rhel-9-x86_64-rpms
35+
dnf install skupper-cli-2.0.0
3436
----
3537

36-
The script installs the command under your home directory. It prompts you to add the command to your path if necessary.
38+
=== Installing the {rhsi} Router on Third-Party Network A
3739

38-
=== Installing {rhsi} on {ocp}
40+
The solution architecture diagram tells you that the Third-Party Network A will run {rhsi} on a {rhel} server as a
41+
regular process, which depends on the {rhsi} Router RPM package being installed first.
3942

40-
[IMPORTANT]
41-
====
42-
The following instructions use the upstream version of {rhsi} (Skupper V2), +
43-
as at the time this solution pattern has been written, RHSI Version 2 has not yet been released. +
44-
Once RHSI Version 2 is released, this whole section will be updated to use it instead.
45-
====
43+
You can optionally run {rhsi} there using Podman, if it is more convenient to you. If that is the case, you can skip
44+
the following task.
45+
46+
[.console-input]
47+
[source,shell script]
48+
----
49+
dnf config-manager --set-enabled service-interconnect-2-for-rhel-9-x86_64-rpms
50+
dnf install skupper-router-3.2.0
51+
----
4652

47-
We need to install *{rhsi}* in two separate namespaces. +
48-
The reason for this is to ensure that each third-party network is connected to an isolated _Virtual Application Network_ (VAN).
53+
=== Installing {rhsi} on {ocp}
54+
55+
We need to install *{rhsi}* on the {ocp} cluster as we will need to create two separate Sites in two distinct namespaces. The reason for this is to ensure that each Third-party Site is connected to an isolated _Virtual Application Network_ (VAN).
4956

5057
Along with that we will also create _Network Policies_ to ensure that each namespace is only accessible by AAP, so that the third-party servers exposed into the {ocp} cluster can only be reached internally by AAP.
5158

5259
==== Installing the *{rhsi}* controller
5360

5461
The RHSI controller is deployed to its own namespace and it has the ability to watch for RHSI resources across all namespaces in the {ocp} cluster.
62+
You can install the RHSI controller using the following approaches:
63+
64+
* The Red Hat Service Interconnect Operator (available through the Red Hat operators catalog on OpenShift clusters)
65+
** NOTE: you must use channel *stable-2*
66+
* Using YAMLs available through the https://access.redhat.com/downloads[Red Hat Software Downloads page]
67+
** Product: Red Hat Service Interconnect
68+
** Version: 2.0.0
69+
** Type: Distributions
70+
** File: Skupper deployments (yamls)
5571

56-
Let's install the RHSI controller:
72+
Let's install the RHSI controller using the downloaded YAMLs:
5773

5874
* Open a terminal
75+
* Download the RHSI controller YAMLs from Red Hat Software Downloads page (detailed above)
5976
* Set the *KUBECONFIG* environment variable
6077
** You must be logged in as a cluster administrator
6178
* Create the `*skupper*` namespace, using:
@@ -71,7 +88,7 @@ kubectl create namespace skupper
7188
[.console-input]
7289
[source,shell script]
7390
----
74-
kubectl -n skupper apply -f https://skupper.io/v2/install.yaml
91+
kubectl -n skupper apply -f skupper-cluster-scope-2.0.0-rh.yaml
7592
----
7693
+
7794
* Now wait for the *skupper-controller* pod to be running on the *skupper* namespace:
@@ -117,19 +134,19 @@ The site definiton sets the *_linkAccess_* value to *_default_*. This will ensur
117134
On {ocp} clusters, a *Route* should be created, otherwise a *LoadBalancer* service will be created.
118135
This ingress method is used to accept incoming links, coming from other Sites.
119136

120-
The `*AccessGrant*` allows a single `*AccessToken*` to be redeemed and it must be redeemed within 30 minutes from `*AccessGrant*` creation, otherwise it won't be valid.
137+
The `*AccessGrant*` allows a single `*AccessToken*` to be redeemed and it must be redeemed within 30 minutes from `*AccessGrant*` creation, otherwise it won't be valid anymore.
121138

122139
Each site has a `*Listener*` for each target server expected by AAP. +
123140
The `*spec.host*` field determines the service name that will be created on the respective namespace,
124-
therefore the fully qualified service name will be composed by the `spec.host` field plus the namespace name, matching the hostnames that will be added to the inventories in AAP.
141+
therefore the fully qualified service name will be composed by the `spec.host` field plus the namespace name, matching the hostnames that will be added to the inventories on AAP.
125142

126143
The `*spec.routingKey*` is used to determine the matching Connector.
127144
So the RHSI sites created inside the third-party networks, must define the respective `*spec.routingKey*`.
128145

129-
Along with the RHSI resources, a _Network policy_ will be defined, to add an extra security layer, preventing undesired internal access to your third-party network namespaces. +
130-
This `*NetworkPolicy*` allows ingress to the `*skupper-router*` pod only coming from pods running on the `*aap*` or the self namespace `*net-a*`.
146+
Along with the RHSI resources, _Network policies_ will be defined, to add an extra security layer, preventing undesired internal access to your third-party network namespaces. +
147+
These `*NetworkPolicies*` allow ingress to the `*skupper-router*` pod only coming from pods running on the `*aap*` namespace, the self namespace `*net-a*` or from external sites (through {rhsi} links).
131148

132-
To create the namespace, the RHSI site and the network policy, run the following commands in your terminal that has access to the {ocp} cluster. The commands below will first create the resources in a local directory then apply them to the {ocp} cluster.
149+
To create the namespace, the RHSI site and the network policies, run the following commands in your terminal that has access to the {ocp} cluster. The commands below will first create the resources in a local directory then apply them to the {ocp} cluster.
133150

134151
[.console-input]
135152
[source,shell script]
@@ -203,6 +220,7 @@ spec:
203220
EOF
204221
205222
cat << EOF > cloud/net-a/40-networkpolicy.yaml
223+
---
206224
apiVersion: networking.k8s.io/v1
207225
kind: NetworkPolicy
208226
metadata:
@@ -224,6 +242,21 @@ spec:
224242
values: ["aap", "net-a"]
225243
egress:
226244
- {}
245+
---
246+
apiVersion: networking.k8s.io/v1
247+
kind: NetworkPolicy
248+
metadata:
249+
name: allow-from-router
250+
namespace: net-a
251+
spec:
252+
ingress:
253+
- from:
254+
- namespaceSelector:
255+
matchLabels:
256+
policy-group.network.openshift.io/ingress: ""
257+
podSelector: {}
258+
policyTypes:
259+
- Ingress
227260
EOF
228261
229262
kubectl apply -f ./cloud/net-a/
@@ -252,9 +285,9 @@ site.skupper.io/net-a OK
252285
==== Preparing site bundles for the third-party network
253286

254287
A site bundle is a compressed file that contains the whole RHSI site definition to run outside of Kubernetes or OpenShift. +
255-
They can be installed to run as a container, using Podman or Docker and also as a regular process on a {rhel} server, which will require a local installation of the `*skupper-router*` _RPM_ package.
288+
They can be installed to run as a container, using Podman or Docker and also as a regular process on a {rhel} server, which will require a local installation of the `*skupper-router*` _RPM_ package (explained earlier).
256289

257-
The site bundle is an easy approach to install a prepared site definition on a remote location, but you could also create a non-Kubernetes site using the {rhsi} V2 CLI or a bootstrap container.
290+
The site bundle is an easy approach to install a prepared site definition on a remote location, but you could also create a system site using the {rhsi} V2 CLI or a bootstrap container.
258291

259292
Here are the Custom Resources (CRs) needed to define the site bundles.
260293

@@ -264,7 +297,7 @@ Here are the Custom Resources (CRs) needed to define the site bundles.
264297

265298
In order to prepare a site bundle to be installed at the Third Party Networks, we will create the Custom Resources (CRs) needed along with an `*AccessTokens*` that will be extracted from the `*net-a*` namespace running on the {ocp} cluster.
266299

267-
To do it, execute the following commands in a terminal that has access to `*net-a*` namespace running on your {ocp} cluster:
300+
To do it, execute the following commands on a terminal with access to `*net-a*` namespace, running on your {ocp} cluster:
268301

269302
[.console-input]
270303
[source,shell script]
@@ -325,7 +358,7 @@ Now that all the CRs are in place, we must generate the site bundle, using:
325358
[.console-input]
326359
[source,shell script]
327360
----
328-
curl -s https://raw.githubusercontent.com/skupperproject/skupper/refs/heads/v2/cmd/bootstrap/bootstrap.sh | sh -s -- -p ./internal/net-a -b bundle
361+
skupper --platform podman system setup --path ./internal/net-a -b bundle
329362
----
330363

331364
The bundle will be generated and its location can be found through a message that says:
@@ -338,7 +371,7 @@ Installation bundle available at: /home/my-user/.local/share/skupper/bundles/sku
338371

339372
=== Connecting the Third-party Network
340373

341-
The last piece to complete the {rhsi} setup is to install the generated site-bundles on the respective server used to reach Third-party Network A (`*net-a*`) hosts.
374+
The last piece to complete the {rhsi} setup is to install the generated site-bundle on the respective server, used to reach Third-party Network A (`*net-a*`) hosts.
342375

343376
To install, you should just send the site bundle file: `*skupper-install-net-a.sh*` to the target server where the RHSI site will be installed, then execute it, for example:
344377

@@ -351,9 +384,10 @@ ssh my-user@my-server-third-party-net-a ./skupper-install-net-a.sh -n net-a
351384

352385
[WARNING]
353386
====
354-
The commands above have been executed against internal hosts that
355-
represent the servers where the RHSI site bundle will be installed
356-
and these servers can reach the target hosts that will be managed by AAP. +
387+
The commands above have been executed against an internal host that
388+
represents the Third Party Network A server where the RHSI site bundle
389+
will be installed into and this server can reach the target hosts that
390+
will be managed by AAP. +
357391
Update the commands to use your own hostnames or IP addresses.
358392
====
359393

@@ -365,8 +399,8 @@ If you want your *Third Party Network A* site to run using a regular process and
365399
[source,shell script]
366400
----
367401
scp skupper-install-net-a.sh my-user@my-server-third-party-net-a:
368-
ssh my-user@my-server-third-party-net-a dnf -y install skupper-router
369-
ssh my-user@my-server-third-party-net-a ./skupper-install-net-a.sh -n net-a -p systemd
402+
ssh my-user@my-server-third-party-net-a dnf -y install skupper-router-3.2.0
403+
ssh my-user@my-server-third-party-net-a ./skupper-install-net-a.sh -n net-a -p linux
370404
----
371405
====
372406

@@ -378,7 +412,8 @@ Now let's have a quick look at what must be done to install and configure {aap}.
378412

379413
We will just briefly explain what is expected from your {aap} installation on the {ocp} cluster.
380414

381-
The {aap} installation is expected to run in the "*aap*" namespace, using the {aap} Operator and an instance of the "Ansible Automation Platform" resource must be created.
415+
The {aap} installation is expected to run in the "*aap*" namespace. +
416+
Using the {aap} Operator, an instance of the "Ansible Automation Platform" resource must be created.
382417

383418
If you need further information, please refer to the https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html-single/installing_on_openshift_container_platform/index#proc-install-cli-aap-operatorinstalling-aap-operator-cli[official installation guide].
384419

@@ -400,13 +435,13 @@ Here is what we will configure:
400435

401436
==== Create a project
402437

403-
The Ansible project that will be used in this solution pattern is a simple fork from the ansible-tower-samples repository which includes an extra task that simply creates a directory under `*/tmp*` named `*created-by-aap*`. +
404-
This helps validate that {aap} has actually connected and performed this respective task against the target host.
438+
The Ansible project that will be used in this solution pattern is a sample project provided by the Ansible team,
439+
that simply connects to each server from your inventory and displays a "Hello World" message.
405440

406441
In the AAP console, create a project using the following information:
407442

408443
* Source control type: *Git*
409-
* Source control URL: https://github.com/fgiorgetti/ansible-tower-samples.git[*https://github.com/fgiorgetti/ansible-tower-samples.git*]
444+
* Source control URL: https://github.com/ansible/ansible-tower-samples.git[*https://github.com/ansible/ansible-tower-samples.git*]
410445
* Source control branch/tag/commit: *master*
411446

412447
==== Create the inventory

0 commit comments

Comments
 (0)