Este contenido no está disponible en el idioma seleccionado.
Chapter 13. Creating a site on a local system using the Skupper CLI
Using the skupper command-line interface (CLI) allows you to create and manage Skupper sites from the context of the current user.
A typical workflow is to create a site, link sites together, and expose services to the application network.
A local system includes Docker, Podman or Linux system.
If you require more than one site, specify a unique namespace when using skupper
, for example skupper --namespace second-site ...
.
13.1. Checking the Skupper CLI and environment Copiar enlaceEnlace copiado en el portapapeles!
Installing the skupper command-line interface (CLI) provides a simple method to get started with Skupper.
- Follow the instructions for Installing Skupper.
Verify the installation.
skupper version COMPONENT VERSION cli 2.1.1
skupper version COMPONENT VERSION cli 2.1.1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For podman sites:
Make sure the Podman socket is available. To enable it:
systemctl --user enable --now podman.socket
systemctl --user enable --now podman.socket
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enable lingering to ensure the site persists over logouts:
loginctl enable-linger <username>
loginctl enable-linger <username>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
13.2. Creating a simple site using the CLI on local systems Copiar enlaceEnlace copiado en el portapapeles!
Prerequisites
-
The
skupper
CLI is installed.
Procedure
Set the
SKUPPER_PLATFORM
for type of site you want to install:-
podman
-
docker
-
linux
-
Install the controller for Podman and Docker sites:
skupper system install
skupper system install
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This runs a container to support site, link and service operations. This feature is not available on Linux local system sites (systemd).
Create a site:
skupper site create <site-name>
skupper site create <site-name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:
skupper site create my-site Waiting for status... Site "my-site" is ready.
skupper site create my-site Waiting for status... Site "my-site" is ready.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow While the site is created, the site is not running at this point. To run the site:
skupper system start
skupper system start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
By default, all sites are created with the namespace default
. On non-Kubernetes sites, you can create multiple sites per-user by specifying a namespace, for example you can create multiple sites with different platforms as follows:
skupper site create systemd-site -p linux -n linux-ns skupper site create docker-site -p docker -n docker-ns
skupper site create systemd-site -p linux -n linux-ns
skupper site create docker-site -p docker -n docker-ns
13.3. Deleting a site using the CLI on local systems Copiar enlaceEnlace copiado en el portapapeles!
Prerequisites
-
The
skupper
CLI is installed.
Procedure
Enter the following command to delete a site:
skupper site delete <sitename> skupper system stop
skupper site delete <sitename> skupper system stop
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can also uninstall the controller after deleting all existing sites:
skupper system uninstall
skupper system uninstall
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
13.4. Creating a site bundle using the CLI on local systems Copiar enlaceEnlace copiado en el portapapeles!
Sometimes, you might want to create all the configuration for a site and apply it automatically to a remote host. To support this, Skupper allows you create a .tar.gz
file with all the required files and an install.sh
script to start the remote site.
Prerequisites
-
The
skupper
CLI is installed. The CLI is not required on the remote site.
Procedure
Set the
SKUPPER_PLATFORM
for type of site you want to install:-
podman
-
docker
-
linux
-
Install the controller for Podman and Docker sites:
skupper system install
skupper system install
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This runs a container to support site, link and service operations. This feature is not available on Linux local system sites (systemd).
Create a site:
skupper site create <site-name>
skupper site create <site-name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:
skupper site create remote-site Waiting for status... Site "remote-site" is ready.
skupper site create remote-site Waiting for status... Site "remote-site" is ready.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow While the site is created, the site is not running and that is not a requirement for this usecase.
Create the bundle:
skupper system generate-bundle remote-site
skupper system generate-bundle remote-site
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output shows the location of the generated
.tar.gz
file, for example:Site "remote-site" has been created (as a distributable bundle) Installation bundle available at: /home/user/.local/share/skupper/bundles/remote-site.tar.gz Default namespace: default Default platform: podman
Site "remote-site" has been created (as a distributable bundle) Installation bundle available at: /home/user/.local/share/skupper/bundles/remote-site.tar.gz Default namespace: default Default platform: podman
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Transfer the bundle file to the remote location and uncompress the file in an appropriate location:
tar -xzvf remote-site.tar.gz
tar -xzvf remote-site.tar.gz
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Start the site:
install.sh
install.sh
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The site is now running, you can verify with
skupper site status
if the CLI is installed at that location.