sealvm

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

how to using it

Run sealvm command to install multipass vms

asciicast

  • install vm tools
sealvm install 
  • init vms
sealvm run --nodes=node:2,master:1
  • run actions
apiVersion: virtual-machine.sealos.io/v1
kind: Action
spec:
  data:
  - mount:
      source: /Users/cuisongliu/Workspaces/go/src/github.com/labring/sealos
      target: /root/go/src/github.com/labring/sealos
  - exec: |
     sudo apt-get -y update
     sudo apt-get install -y make gcc-aarch64-linux-gnu gcc-x86-64-linux-gnu
     sudo apt-get install -y ntpdate
     sudo ntpdate -s ntp1.aliyun.com
  - copy:
      source: /Users/cuisongliu/Workspaces/go/src/github.com/labring/sealos/README.md
      target: /root/README.md
  - copyContent: 
      content: |
        #!/bin/bash
        version=1.20.1
        arch=arm64
        rm -rf /root/go${version}.linux-${arch}.tar.gz
        wget https://studygolang.com/dl/golang/go${version}.linux-${arch}.tar.gz -O /root/go${version}.linux-${arch}.tar.gz
        rm -rf /usr/local/go && tar -C /usr/local -zxvf /root/go${version}.linux-${arch}.tar.gz
        echo "export PATH=\$PATH:/usr/local/go/bin" > /etc/profile.d/golang.sh
        chmod 0755 /etc/profile.d/golang.sh
        rm -rf /root/go${version}.linux-${arch}.tar.gz
        mkdir -p /root/go/src/github.com/labring /root/go/bin /root/go/pkg
        source /etc/profile.d/golang.sh
        go env -w GOPROXY="https://goproxy.io,direct"
      target: /root/golang-install.sh
  - exec: |
      bash /root/golang-install.sh
      source /etc/profile.d/golang.sh && echo $PATH
      git config --global --add safe.directory /root/go/src/github.com/labring/sealos
      cd /root/go/src/github.com/labring/sealos &&  source /etc/profile.d/golang.sh &&  make build
  - copyContent:
    content: |
      #!/bin/bash
      echo "deb [trusted=yes] https://apt.fury.io/labring/ /" | tee /etc/apt/sources.list.d/labring.list
      sudo apt-get update
      sudo apt-get install -y sealos
    target: /root/sealos-apt.sh
  ons:
  - role: master
sealvm action -f action.yaml
  • reset vms
sealvm reset

Documentation

Overview

Copyright © 2022 cuisongliu@qq.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL