Skip to content

Installation

This page describes two installation methods for ClawOS: offline installation and online installation.

Offline Installation

This page explains how to download the ClawOS offline package and install it.

Download

Use the following link to download the ClawOS offline package:

https://qiniu-download-public.daocloud.io/DaoCloud_Enterprise/agentclaw_v0.2.3_amd64.tar

If a newer version is available, replace v0.2.3 in the URL above with the desired version.

Info

If you need the arm64 version, use the following link:

https://qiniu-download-public.daocloud.io/DaoCloud_Enterprise/agentclaw_v0.2.3_arm64.tar

Load Images and Charts from the Offline Package

Info

Prerequisite: Upload the offline package to the target node.

You can load images using either of the following methods. If your environment includes an image registry, using chart-syncer to synchronize images to the registry is recommended because it is more efficient and convenient.

Synchronize Images to an Image Registry with chart-syncer

  1. Create load-image.yaml.

    Note

    All parameters in this YAML file are required. You need a private image registry and must modify the corresponding configuration.

    If a chart repository is already installed in the current environment, chart-syncer also supports exporting Charts to the specified repository.

    load-image.yaml
    source:
      intermediateBundlesPath: clawos-offline # (1)!
    target:
      containerRegistry: 10.16.10.111 # (2)!
      containerRepository: release.daocloud.io/clawos # (3)!
      repo:
        kind: HARBOR # (4)!
        url: http://10.16.10.111/chartrepo/release.daocloud.io # (5)!
        auth:
          username: "admin" # (6)!
          password: "Harbor12345" # (7)!
      containers:
        auth:
          username: "admin" # (8)!
          password: "Harbor12345" # (9)!
    
    1. Relative to the directory where the charts-syncer command is executed, not the relative path between this YAML file and the offline package
    2. Replace with your image registry URL
    3. Replace with your image repository
    4. Can also be any other supported Helm Chart repository type
    5. Replace with your chart repository URL
    6. Your image registry username
    7. Your image registry password
    8. Your image registry username
    9. Your image registry password

    If no chart repository is installed in the current environment, chart-syncer also supports exporting Charts as .tgz files and storing them in the specified path.

    load-image.yaml
    source:
      intermediateBundlesPath: clawos-offline # (1)!
    target:
      containerRegistry: 10.16.10.111 # (2)!
      containerRepository: release.daocloud.io/clawos # (3)!
      repo:
        kind: LOCAL
        path: ./local-repo # (4)!
      containers:
        auth:
          username: "admin" # (5)!
          password: "Harbor12345" # (6)!
    
    1. Relative to the directory where the charts-syncer command is executed, not the relative path between this YAML file and the offline package
    2. Replace with your image registry URL
    3. Replace with your image repository
    4. Local path for storing Charts
    5. Your image registry username
    6. Your image registry password
  2. Run the image synchronization command.

    charts-syncer sync --config load-image.yaml
    

Load Images Directly with Docker or containerd

Extract the package and load the image files.

  1. Extract the tar archive.

    tar xvf agentclaw_0.2.0.bundle.tar
    

    After extraction, the following files will be available:

    • hints.yaml: image manifest
    • images.tar: image package
    • original-chart: chart package
  2. Load images into Docker or containerd from the local file.

    docker load -i images.tar
    
    ctr -n k8s.io image import images.tar
    

Note

You must load the images into Docker or containerd on every node. After loading, tag the images so that the Registry and Repository match those used during installation.

Offline Installation Steps

Prerequisites

  1. Before installation, ensure that the target Kubernetes cluster has the following required services configured:

    • hydra-apiserver
    • kpanda-apiserver
    • ghippo-apiserver
    • kpanda-clusterpedia-apiserver
  2. Update the hydra AuthorizationPolicy to allow traffic from agentclaw-system.

    kubectl -n hydra-system edit AuthorizationPolicy hydra-apiserver
    
    apiVersion: security.istio.io/v1
    kind: AuthorizationPolicy
    metadata:
      name: hydra-apiserver
      namespace: hydra-system
    spec:
      action: ALLOW
      rules:
      - from:
        - source:
            namespaces:
            - dak-system
    +       - agentclaw-system
    
  3. Configure the startup arguments for kube-state-metrics in the insight-system namespace (this configuration must be applied to the cluster where Agent is deployed).

    kubectl -n insight-system edit deployment insight-agent-kube-state-metrics
    
    apiVersion: apps/v1
    kind: Deployment
    metadata:
       name: insight-agent-kube-state-metrics
       namespace: insight-system
    spec:
       template:
          spec:
             containers:
             - name: kube-state-metrics
               args:
              args:
                - --metric-labels-allowlist=nodes=[feature.node.kubernetes.io/cpu-cpuid.HYPERVISOR]
                - '--port=8080'
                - --resources=configmaps,cronjobs,daemonsets,deployments,horizontalpodautoscalers,jobs,limitranges,namespaces,networkpolicies,nodes,persistentvolumeclaims,persistentvolumes,pods,replicasets,replicationcontrollers,resourcequotas,secrets,services,statefulsets,storageclasses
    +           - --metric-annotations-allowlist=deployments=[agentclaw.io/instance-name,agentclaw.io/workspace-id]
    

Install Through the Kpanda UI

After chart-syncer successfully synchronizes the images and Charts, refresh the offline repository in Helm Apps within Kpanda, then locate the agentclaw Chart and install it. No installation parameters need to be changed.

Install with Helm

  1. Add the Helm repository.

    helm repo add agentclaw-release https://release.daocloud.io/chartrepo/clawos
    helm repo update
    
  2. Install the Chart.

    helm upgrade agentclaw agentclaw-release -n agentclaw-system --install --create-namespace
    

Online Installation

Info

The prerequisites for online installation are the same as those for the offline installation.

Install Through the Kpanda UI

First, add the agentclaw-release repository in Helm Apps -> Helm Repositories: https://release.daocloud.io/chartrepo/agentclaw

Then go to Helm Templates, locate the agentclaw Chart, and click Install. No installation parameters need to be changed.

Install with Helm

  1. Add the repository.

    helm repo add agentclaw-release
    helm repo update
    
  2. Install the Chart.

    helm upgrade agentclaw agentclaw-release -n agentclaw-system --install --create-namespace
    

Comments