awctl CLI

Awanio provides awctl cli to help one setup and manage Awanio Cloud Platform. This command supports running on Debian 11 above and Ubuntu 20.04 above only at the moment. We plan to support RedHat 9 in the next milestone.

Install awctl CLI

Before running any following operation, we need to download the awctl cli from Awanio public repository.

curl -O https://storage.awan.io/assets/awctl-linux-amd64.tar.gz
tar -xvf awctl-linux-amd64.tar.gz
sudo chmod +x ./awctl
sudo mv ./awctl /usr/local/bin/
sudo awctl --version

Cluster Configuration File Generator

To perform the installation via CLI, you need to prepare a cluster configuration file. This file contains the information needed to create a new cluster. To create the template, run the following command:

sudo awctl generate-conf-file

A new file will be created. To get more detail about how to use this file, please check Cluster Configuration File Scheme page.

All In One Bundled Solution

To install directly including all required packages and CRDs use this command:

sudo awctl init -f cluster-config.yaml

Step by Step Installation

To install step by step, use these commands:

  1. This is only installing required linux packages such as , containerd etc.

    sudo awctl init -f cluster-config.yaml --package-only
  2. This flag will init cluster in all nodes without any SDN and SDS.

    sudo awctl init -f cluster-config.yaml --cluster-only
  3. This flag will install into the base Kubernetes cluster.

    sudo awctl init -f cluster-config.yaml --sdn-only
  4. This flag will install SDS into base cluster.

    sudo awctl init -f cluster-config.yaml --sds-only
  5. This is to install all required external components.

    sudo awctl init -f cluster-config.yaml --module-only
  6. This will install all awanio components.

    sudo awctl install -f cluster-config.yaml

Web Interface Installation

To perform the installation via web interface, run this command:

sudo awctl webui --port 8081

Then open the installation web page at http://IP-NODE:8081. Adjust the IP-NODE information with the server IP that will be used for installation.

Join New Node to Existing Cluster

  1. Generate join token in existing control-plane node.

    sudo awctl join-token
  2. Use the generated token to join a node to a cluster.

    sudo awctl join \
    --token=xxxxx \
    --endpoint=192.168.1.10:3774 \
    --role=worker \
    --node-ip=192.168.1.11
ParameterDescriptionRequirement
tokenToken for join to existing cluster generated by sudo awctl join-token command.required
endpointEndpoint management node existing cluster.required
roleNode role in cluster. The option is: control-plane-worker, control-plane and worker.required
node-ipThis node IP address that use to communicate with the management node.required
exclude-packageExclude OS package install if the new node already has required packages.required

Update Awanio

The following command will update api, cronjob and UI components.

sudo awctl update

Check Version

To check the current version, run:

sudo awctl version

To check the latest version, run:

sudo awctl version --all

Update awctl Binary

Run the following command to update the awctl binary.

sudo awctl self-update

Patch Cluster Issue

Run the following command to patch issue in cluster caused by previous awctl version.

sudo awctl patch

Show Deployed Cluster URL

To show existing cluster URL, run the following command:

sudo awctl cluster-access -f cluster-config.yaml

Uninstall Existing Awanio Components

To uninstall Awanio components only in a cluster, run the following command:

sudo awctl uninstall -f cluster-config.yaml

Destroy Existing Cluster

To destroy an existing cluster, run the following command:

sudo awctl destroy -f cluster-config.yaml

Cluster Configuration File Scheme

Cluster configuration file inspired by eksctl ClusterConfig file.

apiVersion: awanio.io/v1alpha1
kind: ClusterConfig
metadata:
  license: "GILF-ET4G-YD28-I4NK"
  features: "computes,object-storage,kubernetes,support"
  name: Cluster Name
spec:
  rootUser:
    name: Awanio
    username: awanio
    password: xxx-xxx-xxx
    email: ask@awan.io
  server:
    managementFloatingIP: 172.31.31.20
    ingressExternalIPs:
      - 172.31.31.19
      - 108.137.91.215
    nics:
      internal:
        name: ens5
      external:
        name: eth1
        ip: 103.179.254.253/24
        mac: 16:52:f3:13:6a:25
        gateway: 103.179.254.254/24
        gatewayNodes: awid1
    subnets:
      workload: 10.0.0.0/16
      workloadGateway: 10.0.0.1
      service: 10.1.0.0/16
      external: 103.179.255.0/24
    nodes:
      - name: awid1
        role: control-plane-worker
        user: ubuntu
        sshPort: "22"
        sshPrikeyFile: /home/ubuntu/.ssh/id_rsa
        internalIP: 172.31.31.19/20
        disk:
          - /dev/nvme1n1
      - name: awid3
      # the option is: control-plane, worker and control-plane-worker
        role: worker
        # this user should sudoers and have the public ssh key in remote servers
        user: ubuntu
        sshPort: "22"
        sshPrikeyFile: /home/ubuntu/.ssh/id_rsa
        internalIP: 172.31.17.44/20
        disk:
          - /dev/nvme1n1

Properties

PropertyData typeDescriptionDefault value
apiVersionstring-awanio.io/v1alpha1
kindstring-ClusterConfig
metadataobject--
metadata.licensestring--
metadata.featuresstring-computes,object-storage,kubernetes,support