Skip to content

Commit

Permalink
Skewer update
Browse files Browse the repository at this point in the history
  • Loading branch information
ssorj committed Feb 25, 2024
1 parent 12d2b56 commit c1c3e59
Show file tree
Hide file tree
Showing 41 changed files with 271 additions and 10,109 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: manusa/actions-setup-minikube@v2.10.0
with:
minikube version: "v1.32.0"
kubernetes version: "v1.29.0"
github token: ${{secrets.GITHUB_TOKEN}}
- uses: medyagh/setup-minikube@latest
- run: curl https://skupper.io/install.sh | bash -s -- --version ${{matrix.skupper-version}}
- run: echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- run: ./plano test
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- NOTE: This file is generated from skewer.yaml. Do not edit it directly. -->

# Accessing SERVER using Skupper

[![main](https://github.com/skupperproject/skupper-example-template/actions/workflows/main.yaml/badge.svg)](https://github.com/skupperproject/skupper-example-template/actions/workflows/main.yaml)
Expand Down Expand Up @@ -143,10 +145,10 @@ _Sample output:_
$ skupper init
Waiting for LoadBalancer IP or hostname...
Waiting for status...
Skupper is now installed in namespace 'west'. Use 'skupper status' to get more information.
Skupper is now installed in namespace 'public'. Use 'skupper status' to get more information.

$ skupper status
Skupper is enabled for namespace "west". It is not connected to any other sites. It has no exposed services.
Skupper is enabled for namespace "public". It is not connected to any other sites. It has no exposed services.
~~~

_**Private:**_
Expand All @@ -162,17 +164,21 @@ _Sample output:_
$ skupper init
Waiting for LoadBalancer IP or hostname...
Waiting for status...
Skupper is now installed in namespace 'east'. Use 'skupper status' to get more information.
Skupper is now installed in namespace 'private'. Use 'skupper status' to get more information.

$ skupper status
Skupper is enabled for namespace "east". It is not connected to any other sites. It has no exposed services.
Skupper is enabled for namespace "private". It is not connected to any other sites. It has no exposed services.
~~~

As you move through the steps below, you can use `skupper status` at
any time to check your progress.

## Step 4: Link your sites

A Skupper _link_ is a channel for communication between two sites.
Links serve as a transport for application connections and
requests.

Creating a link requires use of two `skupper` commands in
conjunction, `skupper token create` and `skupper link create`.

Expand Down
8 changes: 2 additions & 6 deletions external/skewer/.github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
schedule:
- cron: "0 0 * * 0"
jobs:
main:
test:
strategy:
fail-fast: false
matrix:
Expand All @@ -16,11 +16,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: manusa/actions-setup-minikube@v2.10.0
with:
minikube version: "v1.32.0"
kubernetes version: "v1.29.0"
github token: ${{secrets.GITHUB_TOKEN}}
- uses: medyagh/setup-minikube@latest
- run: curl https://skupper.io/install.sh | bash -s -- --version ${{matrix.skupper-version}}
- run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- run: ./plano test
Expand Down
80 changes: 47 additions & 33 deletions external/skewer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,40 @@ Or you can use a named step from the library of standard steps:

The standard steps are defined in
[python/skewer/standardsteps.yaml](python/skewer/standardsteps.yaml).
Note that you should not edit this file. Instead, in your
`skewer.yaml` file, you can create custom steps based on the standard
steps. You can override the `title`, `preamble`, `commands`, or
`postamble` field of a standard step by adding the field in addition
to `standard`:
They are the following:

~~~
general/install_the_skupper_command_line_tool
general/link_your_sites
general/access_the_frontend
general/cleaning_up
kubernetes/set_up_your_namespaces
kubernetes/set_up_your_kubernetes_namespace # One namespace only
kubernetes/create_your_sites
kubernetes/link_your_sites
podman/set_up_your_podman_network
hello_world/deploy_the_frontend_and_backend
hello_world/expose_the_backend
hello_world/access_the_frontend
hello_world/cleaning_up
~~~

The `general` steps are generic (or pretty generic) with respect to
platform and application. The `kubernetes` and `podman` steps are
coupled to their platform. The `hello_world` steps are coupled to the
Skupper Hello World app.

**Note:** The `general/link_your_sites` and `general/cleaning_up`
steps are less generic than the other `general` steps. For example,
`general/cleaning_up` doesn't delete any application workoads. Check
that the text and commands these steps produce are doing what you need
for your example. If not, you need to provide a custom step.

You can create custom steps based on the standard steps by overriding
the `title`, `preamble`, `commands`, or `postamble` fields.

~~~ yaml
- standard: cleaning_up
- standard: general/cleaning_up
commands:
east:
- run: skupper delete
Expand All @@ -191,42 +217,30 @@ to `standard`:
- run: skupper delete
~~~

For string fields such as `preamble` and `postamble`, you can include
the standard text inside your custom text by using the `@default@`
placeholder:

~~~ yaml
- standard: general/cleaning_up
preamble: |
@default@
Note: You may also want to flirp your krupke.
~~~

A typical mix of standard and custom steps might look like this:

~~~ yaml
steps:
- standard: install_the_skupper_command_line_tool
- standard: general/install_the_skupper_command_line_tool
- standard: kubernetes/set_up_your_namespaces
<your-custom-deploy-step>
- standard: kubernetes/create_your_sites
- standard: link_your_sites
- standard: kubernetes/link_your_sites
<your-custom-expose-step>
<your-custom-access-step>
- standard: cleaning_up
~~~

**Note:** The `link_your_sites`, `access_the_application`, and
`cleaning_up` steps are less generic than the other steps.
`link_your_sites` assumes just two sites. `access_the_application`
assumes you have a `frontend` service. `cleaning_up` doesn't delete
any application workoads. Check that the text and commands these
steps produce are doing what you need for your example. If not, you
need to provide a custom step.

There are some standard steps for examples based on the Skupper
Hello World application:

~~~ yaml
- standard: hello_world/deploy_the_frontend_and_backend
- standard: hello_world/expose_the_backend
- standard: hello_world/access_the_frontend
- standard: hello_world/cleaning_up
~~~

And finally there are some special cases:
~~~ yaml
- standard: kubernetes/set_up_your_kubernetes_namespace
- standard: podman/set_up_your_podman_network
- standard: general/cleaning_up
~~~

The step commands are separated into named groups corresponding to the
Expand Down
6 changes: 1 addition & 5 deletions external/skewer/config/.github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: manusa/actions-setup-minikube@v2.10.0
with:
minikube version: "v1.32.0"
kubernetes version: "v1.29.0"
github token: ${{secrets.GITHUB_TOKEN}}
- uses: medyagh/setup-minikube@latest
- run: curl https://skupper.io/install.sh | bash -s -- --version ${{matrix.skupper-version}}
- run: echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- run: ./plano test
Expand Down
19 changes: 14 additions & 5 deletions external/skewer/example/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- NOTE: This file is generated from skewer.yaml. Do not edit it directly. -->

# Skupper Hello World

[![main](https://github.com/skupperproject/skewer/actions/workflows/main.yaml/badge.svg)](https://github.com/skupperproject/skewer/actions/workflows/main.yaml)
Expand All @@ -17,7 +19,7 @@ across cloud providers, data centers, and edge sites.
* [Prerequisites](#prerequisites)
* [Step 1: Install the Skupper command-line tool](#step-1-install-the-skupper-command-line-tool)
* [Step 2: Set up your namespaces](#step-2-set-up-your-namespaces)
* [Step 3: Deploy the frontent and backend](#step-3-deploy-the-frontent-and-backend)
* [Step 3: Deploy the frontend and backend](#step-3-deploy-the-frontend-and-backend)
* [Step 4: Create your sites](#step-4-create-your-sites)
* [Step 5: Link your sites](#step-5-link-your-sites)
* [Step 6: Fail on demand](#step-6-fail-on-demand)
Expand Down Expand Up @@ -108,7 +110,7 @@ kubectl create namespace east
kubectl config set-context --current --namespace east
~~~

## Step 3: Deploy the frontent and backend
## Step 3: Deploy the frontend and backend

This example runs the frontend and the backend in separate
Kubernetes namespaces, on different clusters.
Expand Down Expand Up @@ -188,6 +190,10 @@ any time to check your progress.

## Step 5: Link your sites

A Skupper _link_ is a channel for communication between two sites.
Links serve as a transport for application connections and
requests.

Creating a link requires use of two `skupper` commands in
conjunction, `skupper token create` and `skupper link create`.

Expand Down Expand Up @@ -243,7 +249,6 @@ _**West:**_

~~~ shell
if [ -n "${SKEWER_FAIL}" ]; then expr 1 / 0; fi

~~~

## Step 7: Expose the backend
Expand Down Expand Up @@ -317,6 +322,8 @@ navigating to `http://<external-ip>:8080/` in your browser.
To remove Skupper and the other resources from this exercise, use
the following commands:

And more!

_**West:**_

~~~ shell
Expand All @@ -334,11 +341,13 @@ kubectl delete deployment/backend

## Summary

A summary
More summary

## Next steps

Some next steps
Check out the other [examples][examples] on the Skupper website.

More steps

## About this example

Expand Down
1 change: 1 addition & 0 deletions external/skewer/example/python/plano
24 changes: 0 additions & 24 deletions external/skewer/example/python/plano/__init__.py

This file was deleted.

Loading

0 comments on commit c1c3e59

Please sign in to comment.