docker安装轻量级Spug平台

2022-10-27 13:38:38 浏览数 (1)

Spug是面向中小型企业设计的轻量级无Agent的自动化运维平台,整合了主机管理、主机批量执行、主机在线终端、应用发布部署、在线任务计划、配置中心、监控、报警等一系列功能。

# 拉取镜像

代码语言:javascript复制
[root@localhost ~]# docker pull registry.aliyuncs.com/openspug/spug
Using default tag: latest
latest: Pulling from openspug/spug
9b4ebb48de8d: Pull complete 
c4510a8c9615: Pull complete 
5f4c55c74ba4: Pull complete 
e4e46853876c: Pull complete 
82b3cf722df5: Pull complete 
93c1074bb114: Pull complete 
b95e855f7d2e: Pull complete 
fdac384598ed: Pull complete 
02b944ba420f: Pull complete 
c6c8b641b69a: Pull complete 
2441ff86a83e: Pull complete 
66d215f4ee5e: Pull complete 
Digest: sha256:38e6509b136743a1e8a51a382c45eb8939ce2f8c3d37eeda4763da81c8d271c8
Status: Downloaded newer image for registry.aliyuncs.com/openspug/spug:latest
registry.aliyuncs.com/openspug/spug:latest

# 运行

代码语言:javascript复制
[root@localhost ~]# docker run -d --restart=always --name=spug -p 80:80 registry.aliyuncs.com/openspug/spug
8aeaccffb41b533041a07635f49937a965e9991aaea573c585e3c81f684c1399
[root@localhost ~]# docker ps
CONTAINER ID        IMAGE                                 COMMAND             CREATED             STATUS              PORTS                NAMES
8aeaccffb41b        registry.aliyuncs.com/openspug/spug   "/entrypoint.sh"    5 seconds ago       Up 4 seconds        0.0.0.0:80->80/tcp   spug

# 初始化密码

代码语言:javascript复制
[root@localhost ~]# docker exec spug init_spug root hadoop
Migrations for 'account':
  data/spug/spug_api/apps/account/migrations/0001_initial.py
    - Create model Role
    - Create model User
    - Add field created_by to role
    - Create model History
Migrations for 'alarm':
  data/spug/spug_api/apps/alarm/migrations/0001_initial.py
    - Create model Alarm
    - Create model Group
    - Create model Contact
Migrations for 'config':
  data/spug/spug_api/apps/config/migrations/0001_initial.py
    - Create model Service
    - Create model Environment
    - Create model ConfigHistory
    - Create model Config
Migrations for 'exec':
  data/spug/spug_api/apps/exec/migrations/0001_initial.py
    - Create model ExecTemplate
Migrations for 'host':
  data/spug/spug_api/apps/host/migrations/0001_initial.py
    - Create model Host
Migrations for 'monitor':
  data/spug/spug_api/apps/monitor/migrations/0001_initial.py
    - Create model Detection
Migrations for 'notify':
  data/spug/spug_api/apps/notify/migrations/0001_initial.py
    - Create model Notify
Migrations for 'schedule':
  data/spug/spug_api/apps/schedule/migrations/0001_initial.py
    - Create model History
    - Create model Task
Migrations for 'setting':
  data/spug/spug_api/apps/setting/migrations/0001_initial.py
    - Create model Setting
Migrations for 'app':
  data/spug/spug_api/apps/app/migrations/0001_initial.py
    - Create model App
    - Create model Deploy
    - Create model DeployExtend1
    - Create model DeployExtend2
Migrations for 'deploy':
  data/spug/spug_api/apps/deploy/migrations/0001_initial.py
    - Create model DeployRequest
Operations to perform:
  Apply all migrations: account, alarm, app, config, deploy, exec, host, monitor, notify, schedule, setting
Running migrations:
  Applying account.0001_initial... OK
  Applying alarm.0001_initial... OK
  Applying config.0001_initial... OK
  Applying app.0001_initial... OK
  Applying deploy.0001_initial... OK
  Applying exec.0001_initial... OK
  Applying host.0001_initial... OK
  Applying monitor.0001_initial... OK
  Applying notify.0001_initial... OK
  Applying schedule.0001_initial... OK
  Applying setting.0001_initial... OK
初始化/更新成功
创建用户成功

# 重启

代码语言:javascript复制
[root@localhost ~]# docker restart spug
spug
[root@localhost ~]# 

# 验证

0 人点赞