Skip to content

awctl CLI

Awanio は、Awanio Cloud Platform のセットアップと管理を支援するために awctl CLI を提供しています。現時点では Debian 11 以上および Ubuntu 20.04 以上のみをサポートしています。次のマイルストーンで RedHat 9 のサポートを予定しています。

awctl CLI のインストール

以降の操作を実行する前に、Awanio のパブリックリポジトリから awctl CLI をダウンロードする必要があります。

bash
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

CLI でインストールするには、クラスタ構成ファイルを準備する必要があります。このファイルには新しいクラスターを作成するために必要な情報が含まれます。テンプレートを作成するには、次のコマンドを実行します。

bash
sudo awctl generate-conf-file

新しいファイルが作成されます。このファイルの使い方の詳細は、クラスタ構成ファイルのスキーマ セクションを参照してください。

All In One Bundled Solution

必要なパッケージと CRD をすべて含めて直接インストールするには、次のコマンドを使用します。

bash
sudo awctl init -f cluster-config.yaml

Step by Step Installation

段階的にインストールするには、次のコマンドを使用します。

  1. 必要な Linux パッケージ(containerd など)のみをインストールします。 ```bash sudo awctl init -f cluster-config.yaml --package-only ```
  2. SDN と SDS をインストールせずに、すべてのノードでクラスターを初期化します。 ```bash sudo awctl init -f cluster-config.yaml --cluster-only ```
  3. SDN をベース Kubernetes クラスターにインストールします。 ```bash sudo awctl init -f cluster-config.yaml --sdn-only ```
  4. SDS をベースクラスターにインストールします。 ```bash sudo awctl init -f cluster-config.yaml --sds-only ```
  5. 必要な外部コンポーネントをすべてインストールします。 ```bash sudo awctl init -f cluster-config.yaml --module-only ```
  6. すべての Awanio コンポーネントをインストールします。 ```bash sudo awctl install -f cluster-config.yaml ```

Web Interface Installation

Web インターフェースでインストールするには次のコマンドを実行します。

bash
sudo awctl webui --port 8081

その後、http://IP-NODE:8081 でインストール Web ページを開きます。IP-NODE の情報は、インストールに使用するサーバーの IP に置き換えてください。

Join New Node to Existing Cluster

  1. 既存の control-plane ノードで join token を生成します。 ```bash sudo awctl join-token ```
  2. 生成した token を使用してノードをクラスターに参加させます。 ```bash 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

次のコマンドは API、cronjob、UI コンポーネントを更新します。

bash
sudo awctl update

Check Version

現在のバージョンを確認するには次を実行します。

bash
sudo awctl version

最新バージョンを含む一覧を確認するには次を実行します。

bash
sudo awctl version --all

Update awctl Binary

awctl バイナリを更新するには次のコマンドを実行します。

bash
sudo awctl self-update

Patch Cluster Issue

以前の awctl バージョンが原因で発生したクラスタ問題を修正(patch)するには次のコマンドを実行します。

bash
sudo awctl patch

Show Deployed Cluster URL

既存クラスターの URL を表示するには次のコマンドを実行します。

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

Uninstall Existing Awanio Components

クラスター内の Awanio コンポーネントのみをアンインストールするには次のコマンドを実行します。

bash
sudo awctl uninstall -f cluster-config.yaml

Destroy Existing Cluster

既存クラスターを破棄(destroy)するには次のコマンドを実行します。

bash
sudo awctl destroy -f cluster-config.yaml

Cluster Configuration File Scheme

クラスタ構成ファイルは eksctl の ClusterConfig ファイルに着想を得ています。

yaml
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

プロパティ

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