Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker 应用通用安装 #2

Open
chendelin1982 opened this issue Apr 19, 2022 · 10 comments
Open

Docker 应用通用安装 #2

chendelin1982 opened this issue Apr 19, 2022 · 10 comments
Labels
enhancement New feature or request

Comments

@chendelin1982
Copy link

chendelin1982 commented Apr 19, 2022

目标

满足 Docker 类应用可以快速生产镜像

需求

  1. 模板化的 Docker 项目可无需修改直接生产,即将 Docker 项目看做是本项目的【插件】
  2. 可在一次生产多应用

设计

  1. 端口、路径、服务名称约定,软连接统一性
  2. Web Server 选择(Nginx, Nginx-GUI, Traefix?)
  3. 数据库 GUI 工具的一对多能力
  4. Docker 网络规划,多个 compose 编排之间如何连通?
  5. 应用随机密码转移到 Docker 项目
  6. ansible 组织结构问题(深度读写 role,galaxy, collection 的组织方式)
  7. ansible 安装应用与Stackhub CLI 安装应用有没有重复劳动?
  8. 应用的端口映射到宿主机要慎重?
@chendelin1982 chendelin1982 added the enhancement New feature or request label Apr 19, 2022
@qiaofeng1227
Copy link
Contributor

@qiaofeng1227
Copy link
Contributor

qiaofeng1227 commented Apr 20, 2022

ansible-galaxy collection init websoft9.mysql
[root@iZj6c0zfkuoye7ynl2c5mfZ nginx]# tree websoft9
websoft9
└── mysql
    ├── docs
    ├── galaxy.yml
    ├── plugins
    │   └── README.md
    ├── README.md
    └── roles
[root@iZj6c0zfkuoye7ynl2c5mfZ nginx]# ansible-galaxy role init test_role
[root@iZj6c0zfkuoye7ynl2c5mfZ nginx]# tree test_role
test_role
├── defaults
│   └── main.yml
├── files
├── handlers
│   └── main.yml
├── meta
│   └── main.yml
├── README.md
├── tasks
│   └── main.yml
├── templates
├── tests
│   ├── inventory
│   └── test.yml
└── vars
    └── main.yml


[root@iZj6c7cj31hijkg5cfonobZ ~]#  ansible-galaxy init --type apb ansible-test
[root@iZj6c7cj31hijkg5cfonobZ ~]# tree ansible-test/
ansible-test/
├── apb.yml
├── defaults
│   └── main.yml
├── Dockerfile
├── files
├── handlers
│   └── main.yml
├── Makefile
├── meta
│   └── main.yml
├── playbooks
│   ├── deprovision.yml
│   └── provision.yml
├── README.md
├── tasks
│   └── main.yml
├── templates
├── tests
│   ├── ansible.cfg
│   ├── inventory
│   └── test.yml
└── vars
    └── main.yml

@qiaofeng1227
Copy link
Contributor

qiaofeng1227 commented Apr 21, 2022

image

image

@qiaofeng1227
Copy link
Contributor

补充一点,role是可以依赖其他远程role的,但是实验一直没成功

@qiaofeng1227
Copy link
Contributor

collection structure

@qiaofeng1227
Copy link
Contributor

how to pubulish a self collection? e.g. namaspace:qiaofeng1227 collection:owncloud

ansible-galaxy collection init qiaofeng1227.owncloud
add meta/runtime.yml
[root@iZj6c7cj31hijkg5cfonobZ owncloud]# cat meta/runtime.yml 
requires_ansible: ">=2.9"

[root@iZj6c7cj31hijkg5cfonobZ owncloud]#ansible-galaxy collection build
[root@iZj6c7cj31hijkg5cfonobZ owncloud]# ls
docs  galaxy.yml  meta  plugins  qiaofeng1227-owncloud-1.0.0.tar.gz  README.md  roles

ansible-galaxy collection publish qiaofeng1227-owncloud-1.0.0.tar.gz --api-key XXXX

@qiaofeng1227
Copy link
Contributor

image

@qiaofeng1227
Copy link
Contributor

即使是没有role,plugin,module,playbook,也可以发布成功。

@chendelin1982
Copy link
Author

Collection 用途

  1. 被其他 playbook 调用模块
  2. 完成的 project ?

1 similar comment
@chendelin1982
Copy link
Author

Collection 用途

  1. 被其他 playbook 调用模块
  2. 完成的 project ?

@qiaofeng1227 qiaofeng1227 reopened this Nov 19, 2022
@qiaofeng1227 qiaofeng1227 transferred this issue from Websoft9/websoft9 Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants