Install package from Hub
3 minute read
Installing KOSI packages from KubeOps Hub
To install KOSI packages from the KubeOps Hub on your machines, follow these steps:
-
Search for the Package:
Use thekosi searchcommand to find the desired package on the KubeOps Hub.
(Refer to kosi search for more info.) -
Install the Package:
Copy the installation address of the desired package and use it with thekosi installcommand:[root@localhost ~]# kosi install --hub <hubname> <installation address>
Note: The
--hubparameter is used to install packages from the software Hub.
To be able to install a package from the software Hub, you must be logged in as a user.
Install from Private Hub
Example:
The package livedemo of user kosi with version 2.7.1 is to be installed from the private software Hub:
[root@localhost ~]# kosi install kosi/livedemo:2.7.1
Install from Public Hub
Example:
The package livedemo of user kosi with version 2.7.1 is to be installed from the public software Hub:
[root@localhost ~]# kosi install --hub public kosi/livedemo:2.7.1
Install along with yaml files
The -f parameter is used to provide YAML files from the user.
[root@localhost ~]# kosi install <package> -f <user.yaml>
Example:
The package livedemo of user kosi with version 2.7.1 is installed from the public software Hub with user-specific YAML files:
[root@localhost ~]# kosi install --hub public kosi/livedemo:2.7.1 -f userfile1.yaml
Install in specific namespace
The --namespace flag allows you to specify a Kubernetes namespace for the installation.
[root@localhost ~]# kosi install --hub <hubname> <package> --namespace <namespace>
Example:
The package livedemo of user kosi with version 2.7.1 is installed from the public software Hub in a custom Kubernetes namespace:
[root@localhost ~]# kosi install --hub public kosi/livedemo:2.7.1 --namespace MyNamespace
Note: If no
--namespaceparameter is specified, the default namespace will be used.
Install with specific deployment name
The --dname flag allows you to assign a specific name to the deployment.
[root@localhost ~]# kosi install --hub <hubname> <package> --dname <deploymentname>
Example:
The package livedemo of user kosi with version 2.7.1 is installed from the public software Hub with a deployment name set:
[root@localhost ~]# kosi install --hub public kosi/livedemo:2.7.1 --dname MyDeployment
If no --dname parameter is specified, a random deployment name will be generated.
Note: The deployment name is stored in the file
/home/<user>/var/kubeops/kosi/deployment.yaml.
In these few steps, you can successfully install and use a KOSI package.
For additional functionality and features provided by KOSI, always refer to the Full Documentation.
Install on a machine with no internet connection
- Download the Package:
Usekosi pullon a machine with an internet connection to download the package:
[root@localhost ~]# kosi pull [package name from hub] -o [your preferred name] --hub public
-
Transfer the Package:
Move the downloaded package to the machine without an internet connection (which has KubeOps installed). -
Install the Package:
Install the transferred package with the following command:
[root@localhost ~]# kosi install -p [package name]