Skip to content

Commit

Permalink
Adjust the standard steps for Podman sites
Browse files Browse the repository at this point in the history
  • Loading branch information
ssorj committed Nov 25, 2024
1 parent 3d94423 commit 8d69564
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 23 deletions.
24 changes: 12 additions & 12 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ _**West:**_

~~~ shell
skupper site create west --enable-link-access
kubectl wait --for condition=Ready site/west # Required with preview 1 - to be removed!
kubectl wait --for condition=Ready --timeout=60s site/west # Required with preview 1 - to be removed!
~~~

_Sample output:_
Expand All @@ -184,15 +184,15 @@ $ skupper site create west --enable-link-access
Waiting for status...
Site "west" is configured. Check the status to see when it is ready

$ kubectl wait --for condition=Ready site/west # Required with preview 1 - to be removed!
$ kubectl wait --for condition=Ready --timeout=60s site/west # Required with preview 1 - to be removed!
site.skupper.io/west condition met
~~~

_**East:**_

~~~ shell
skupper site create east
kubectl wait --for condition=Ready site/east # Required with preview 1 - to be removed!
kubectl wait --for condition=Ready --timeout=60s site/east # Required with preview 1 - to be removed!
~~~

_Sample output:_
Expand All @@ -202,7 +202,7 @@ $ skupper site create east
Waiting for status...
Site "east" is configured. Check the status to see when it is ready

$ kubectl wait --for condition=Ready site/east # Required with preview 1 - to be removed!
$ kubectl wait --for condition=Ready --timeout=60s site/east # Required with preview 1 - to be removed!
site.skupper.io/east condition met
~~~

Expand Down Expand Up @@ -234,17 +234,17 @@ Then, use `skupper token redeem` in East to link the sites.
_**West:**_

~~~ shell
skupper token issue ~/token.yaml
skupper token issue ~/secret.token
~~~

_Sample output:_

~~~ console
$ skupper token issue ~/token.yaml
$ skupper token issue ~/secret.token
Waiting for token status ...

Grant "west-cad4f72d-2917-49b9-ab66-cdaca4d6cf9c" is ready
Token file /run/user/1000/skewer/token.yaml created
Token file /run/user/1000/skewer/secret.token created

Transfer this file to a remote site. At the remote site,
create a link to this site using the "skupper token redeem" command:
Expand All @@ -257,16 +257,16 @@ The token expires after 1 use(s) or after 15m0s.
_**East:**_

~~~ shell
skupper token redeem ~/token.yaml
skupper token redeem ~/secret.token
~~~

_Sample output:_

~~~ console
$ skupper token redeem ~/token.yaml
$ skupper token redeem ~/secret.token
Waiting for token status ...
Token "west-cad4f72d-2917-49b9-ab66-cdaca4d6cf9c" has been redeemed
You can now safely delete /run/user/1000/skewer/token.yaml
You can now safely delete /run/user/1000/skewer/secret.token
~~~

If your terminal sessions are on different machines, you may need
Expand Down Expand Up @@ -334,8 +334,8 @@ Waiting for create to complete...
Connector "backend" is ready
~~~

The commands shown above use the name argument, `backend`, to set
the default routing key and pod selector. You can use the
The commands shown above use the name argument, `backend`, to also
set the default routing key and pod selector. You can use the
`--routing-key` and `--selector` options to specify other values.

## Step 10: Access the frontend
Expand Down
67 changes: 56 additions & 11 deletions python/skewer/standardsteps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,45 @@ general/install_the_skupper_command_line_tool:
[install-script]: https://github.com/skupperproject/skupper-website/blob/main/input/install.sh
[install-docs]: https://skupper.io/install/
general/create_your_sites:
title: Create your sites
preamble: |
A Skupper _site_ is a location where components of your
application are running. Sites are linked together to form a
network for your application.
For each namespace, use `skupper site create` with a site name of
your choice. This creates the site resource and deploys the
Skupper router to the namespace.
**Note:** If you are using Minikube, you need to [start minikube
tunnel][minikube-tunnel] before you run `skupper site create`.
<!-- XXX Explain enabling link acesss on one of the sites -->
[minikube-tunnel]: https://skupper.io/start/minikube.html#running-minikube-tunnel
commands:
"0":
- run: skupper site create @namespace@ --enable-link-access
output: |
Waiting for status...
Site "@namespace@" is configured. Check the status to see when it is ready
- run: |
kubectl wait --for condition=Ready --timeout=60s site/@namespace@ # Required with preview 1 - to be removed!
output: |
site.skupper.io/@namespace@ condition met
"*":
- run: skupper site create @namespace@
output: |
Waiting for status...
Site "@namespace@" is configured. Check the status to see when it is ready
- run: |
kubectl wait --for condition=Ready --timeout=60s site/@namespace@ # Required with preview 1 - to be removed!
output: |
site.skupper.io/@namespace@ condition met
postamble: |
You can use `skupper site status` at any time to check the status
of your site.
general/link_your_sites:
title: Link your sites
preamble: |
Expand Down Expand Up @@ -164,6 +203,19 @@ kubernetes/install_skupper_on_your_clusters:
commands:
"*":
- run: kubectl apply -f https://skupper.io/v2/install.yaml
kubernetes/install_skupper_on_your_cluster:
title: Install Skupper on your cluster
platform: kubernetes
preamble: |
Using Skupper on Kubernetes requires the installation of the
Skupper custom resource definitions (CRDs) and the Skupper
controller.
Use `kubectl apply` with the Skupper installation YAML to install
the CRDs and controller.
commands:
"*":
- run: kubectl apply -f https://skupper.io/v2/install.yaml
kubernetes/create_your_sites:
title: Create your sites
platform: kubernetes
Expand All @@ -190,7 +242,7 @@ kubernetes/create_your_sites:
Waiting for status...
Site "@namespace@" is configured. Check the status to see when it is ready
- run: |
kubectl wait --for condition=Ready site/@namespace@ # Required with preview 1 - to be removed!
kubectl wait --for condition=Ready --timeout=60s site/@namespace@ # Required with preview 1 - to be removed!
output: |
site.skupper.io/@namespace@ condition met
"*":
Expand All @@ -199,7 +251,7 @@ kubernetes/create_your_sites:
Waiting for status...
Site "@namespace@" is configured. Check the status to see when it is ready
- run: |
kubectl wait --for condition=Ready site/@namespace@ # Required with preview 1 - to be removed!
kubectl wait --for condition=Ready --timeout=60s site/@namespace@ # Required with preview 1 - to be removed!
output: |
site.skupper.io/@namespace@ condition met
postamble: |
Expand Down Expand Up @@ -293,17 +345,10 @@ podman/set_up_your_podman_environment:
environment variable to `podman`. This sets the Skupper platform
to Podman for this terminal session.
Use `podman network create` to create the Podman network that
Skupper will use.
Use `systemctl` to enable the Podman API service.
commands:
"*":
- run: export SKUPPER_PLATFORM=podman
- run: podman network create skupper
apply: readme
- run: if ! podman network exists skupper; then podman network create skupper; fi
apply: test
- run: systemctl --user enable --now podman.socket
postamble: |
If the `systemctl` command doesn't work, you can try the `podman
Expand Down Expand Up @@ -353,8 +398,8 @@ hello_world/expose_the_backend:
Waiting for create to complete...
Connector "backend" is ready
postamble: |
The commands shown above use the name argument, `backend`, to set
the default routing key and pod selector. You can use the
The commands shown above use the name argument, `backend`, to also
set the default routing key and pod selector. You can use the
`--routing-key` and `--selector` options to specify other values.
hello_world/access_the_frontend:
title: Access the frontend
Expand Down

0 comments on commit 8d69564

Please sign in to comment.