Skip to content

KoKo Deployment⚓︎

1 KoKo Component Description⚓︎

Koko is a edition of coco with GO,it is reconstructed coco's SSH/SFTP and Web Terminal service.

1.1 Enviroment Requirement⚓︎

Name KoKo Go Node Redis Client
Version v3.10.5 1.18 16.5 >= 6.0

1.2 Select Method of Deployment⚓︎

  • Download source code
  • Download code.tar.gz from project web site,extract the folder to obtain the files:
cd /opt
mkdir /opt/koko-v3.10.5
wget -O /opt/koko-v3.10.5.tar.gz https://github.com/jumpserver/koko/archive/refs/tags/v3.10.5.tar.gz
tar -xf koko-v3.10.5.tar.gz -C /opt/koko-v3.10.5 --strip-components 1
  • Install Node。
  • You can refer to the deployment documentation for Node.js from the official Node website. Based on the environment requirements, you can check Inviroment Requiements if it's installed using the command line.

node -v
v16.5

  • Install client dependency.
apt-get update
apt install software-properties-common
add-apt-repository -y ppa:redislabs/redis
apt-get install -y mariadb-client bash-completion redis-tools
cd /opt
mkdir /opt/kubectl-aliases
wget http://download.jumpserver.org/public/kubectl_aliases.tar.gz -O kubectl_aliases.tar.gz
tar -xf kubectl_aliases.tar.gz -C /opt/kubectl-aliases
  • Install Go。
  • You can refer to the deployment documentation for golang from the official Go website,Based on the enviroment requirement Inviroment Requirements,if it's installed using the command line:
cd /opt
wget https://golang.google.cn/dl/go1.18.7.linux-amd64.tar.gz
tar -xf go1.18.7.linux-amd64.tar.gz -C /usr/local/
chown -R root:root /usr/local/go
export PATH=/usr/local/go/bin:$PATH
echo 'export PATH=/usr/local/go/bin:$PATH' >> ~/.bashrc

go version
go version go1.18.7 linux/amd64

  • Compile.
OS Arch Command
Linux amd64 make linux
macOS amd64 make darwin
cd /opt/koko-v3.10.5
make
cp build/koko-v3.10.5-linux-amd64.tar.gz /opt

After the build is completed, it will be generated in the 'build' directory.

  • Download Release File
  • You can obtain the latest stable snapshot of the code from the Github website. These versions are stable snapshots Release of the latest code.
OS Arch Name
Linux amd64 koko-v3.10.5-linux-amd64.tar.gz
Linux arm64 koko-v3.10.5-linux-arm64.tar.gz
linux loong64 koko-v3.10.5-linux-loong64.tar.gz
Darwin amd64 koko-v3.10.5-darwin-amd64.tar.gz
Darwin arm64 koko-v3.10.5-darwin-arm64.tar.gz
cd /opt
wget https://download.jumpserver.org/public/kubectl-linux-amd64.tar.gz -O kubectl.tar.gz
tar -xf kubectl.tar.gz
mv kubectl /usr/local/bin/rawkubectl
wget https://download.jumpserver.org/public/helm-v3.9.0-linux-amd64.tar.gz
tar -xf helm-v3.9.0-linux-amd64.tar.gz
mv linux-amd64/helm /usr/local/bin/rawhelm
chmod 755 /usr/local/bin/rawkubectl /usr/local/bin/rawhelm
chown root:root /usr/local/bin/rawkubectl /usr/local/bin/rawhelm
rm -rf linux-amd64
wget https://github.com/jumpserver/koko/releases/download/v3.10.5/koko-v3.10.5-linux-amd64.tar.gz
tar -xf koko-v3.10.5-linux-amd64.tar.gz -C /opt
cd koko-v3.10.5-linux-amd64
mv kubectl /usr/local/bin/kubectl
cd /opt
wget https://download.jumpserver.org/public/kubectl-linux-arm64.tar.gz -O kubectl.tar.gz
tar -xzf kubectl.tar.gz
mv kubectl /usr/local/bin/rawkubectl
wget https://download.jumpserver.org/public/helm-v3.9.0-linux-arm64.tar.gz
tar -xf helm-v3.9.0-linux-arm64.tar.gz
mv linux-arm64/helm /usr/local/bin/rawhelm
chmod 755 /usr/local/bin/rawkubectl /usr/local/bin/rawhelm
chown root:root /usr/local/bin/rawkubectl /usr/local/bin/rawhelm
rm -rf linux-arm64
wget https://github.com/jumpserver/koko/releases/download/v3.10.5/koko-v3.10.5-linux-arm64.tar.gz
tar -xf koko-v3.10.5-linux-arm64.tar.gz -C /opt
cd koko-v3.10.5-linux-arm64
mv kubectl /usr/local/bin/kubectl

1.3 Update configuration file⚓︎

cp config_example.yml config.yml
vi config.yml
# The project name, used for registration with Jumpserver, it's for identification purposes and must be unique to avoid duplication.
# NAME: {{ Hostname }}

# URL of Jumpserver project, it's used for api application
CORE_HOST: http://127.0.0.1:8080   # URL of the Core 

# Bootstrap Token, shared secret key, coco use it to registers  for service account and terminal.
# Please ensure consistency with the Jumpserver configuration file. Once registration is completing, you can delete it.
BOOTSTRAP_TOKEN: ********  # Keep consistency value with Core config.yml 

# The IP bound during startup, default is 0.0.0.0
BIND_HOST: 0.0.0.0

# Listening port for SSH, default is 2222
SSHD_PORT: 2222            # 0.0.0.0:2222

# Listening port for HTTP/WS,default is 5000
HTTPD_PORT: 5000           # 0.0.0.0:5000

# The project's ACCESS KEY is registered by default and saved in ACCESS_KEY_STORE.
# If necessary, you can write it to the configuration file in the format access_key_id:access_key_secret
# ACCESS_KEY: null

# ACCESS KEY 
# ACCESS_KEY_FILE: data/keys/.access_key

# Set log level [DEBUG, INFO, WARN, ERROR, FATAL, CRITICAL]
LOG_LEVEL: DEBUG           # In development, it's recommended to set DEBUG, while in production, it's recommended to set ERROR.

# SSH connection timeout (default 15 seconds)
# SSH_TIMEOUT: 15

# Language Setting [en,zh]
# LANGUAGE_CODE: zh

# root direcory of SFTP, Optional: /tmp, Home, or any other custom directory
# SFTP_ROOT: /tmp

# Does SFTP display hidden files?
# SFTP_SHOW_HIDDEN_FILE: false

# Should connections established with the backend assets be reused (users won't reuse connections from other users)?
# REUSE_CONNECTION: true

# Asset loading strategy can be adjusted based on the scale of assets. By default, assets are asynchronously loaded, and search pagination is also asynchronous. If set to 'all', then all assets are loaded, and local search pagination is used.
# ASSET_LOAD_POLICY:

# The maximum limit for a zip compression (Unit: M)
# ZIP_MAX_SIZE: 1024M

# The temporary directory for storing zip compression files '/tmp'
# ZIP_TMP_PATH: /tmp

# The interval (in seconds) for sending heartbeats to the SSH client. The default is 30, and 0 indicates no heartbeats are sent
# CLIENT_ALIVE_INTERVAL: 30

# The number of retry attempts for sending heartbeats to assets,default is 3
# RETRY_ALIVE_COUNT_MAX: 3

# The type of session sharing used [local, redis], default is local
# SHARE_ROOM_TYPE: local

# Redis Configuration
# REDIS_HOST: 127.0.0.1      # If you need to deploy multiple instances of koko, you will need to use Redis to maintain session persistence
# REDIS_PORT: 6379
# REDIS_PASSWORD:
# REDIS_CLUSTERS:
# REDIS_DB_ROOM:

1.4 Start KoKo⚓︎

./koko