We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
希望本篇文章帮助你快速地了解如何快速地上手OpenLab。
OpenLab提供的核心能力之一,就是可以为项目提供计算资源(目前以虚拟机为主),用户可以通过配置来完成任务的定义,那么,先以"Hello OpenLab"为例介绍如何使用OpenLab的资源。
首先,我们要通过配置文件,来告诉OpenLab,哪个项目需要跑什么脚本,具体如下:
https://github.com/Yikun/arm-openlab-test
Yikun/arm-openlab-test
配置文件(.zuul.yaml):
- project: name: Yikun/hello-openlab check: jobs: - hello-openlab-test - job: name: hello-openlab-test parent: init-test description: | Hello OpenLab in OpenLab ARM cluster. run: .zuul/playbooks/arm-openlab-test/run.yaml nodeset: ubuntu-xenial-arm64
脚本文件(.zuul/playbooks/arm-openlab-test/run.yaml):
- hosts: all tasks: - name: Hello OpenLab shell: cmd: | set -xe echo "Hello OpenLab" executable: /bin/bash
为了让用户减少重复工作,OpenLab也提供了一些常用的脚本完成基本的安装。如下所示:
- hosts: all roles: - role: config-golang arch: arm64 tasks: - name: Hello OpenLab shell: cmd: | set -xe echo "Hello OpenLab" executable: /bin/bash
用户只需要指定config-golang,即可完成环境上golang的arm64版本的安装。
config-golang
roles: - role: config-golang arch: arm64
当然,如果发现了更好的role,也可以直接贡献到OpenLab。
实例参考:Yikun/hello-openlab#2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
希望本篇文章帮助你快速地了解如何快速地上手OpenLab。
1. Hello OpenLab
OpenLab提供的核心能力之一,就是可以为项目提供计算资源(目前以虚拟机为主),用户可以通过配置来完成任务的定义,那么,先以"Hello OpenLab"为例介绍如何使用OpenLab的资源。
Step 0 申请资源
Step 1 配置Job
首先,我们要通过配置文件,来告诉OpenLab,哪个项目需要跑什么脚本,具体如下:
https://github.com/Yikun/arm-openlab-test
的项目名称为Yikun/arm-openlab-test
举个栗子:
配置文件(.zuul.yaml):
脚本文件(.zuul/playbooks/arm-openlab-test/run.yaml):
2. roles——减少重复工作的利器
为了让用户减少重复工作,OpenLab也提供了一些常用的脚本完成基本的安装。如下所示:
用户只需要指定
config-golang
,即可完成环境上golang的arm64版本的安装。当然,如果发现了更好的role,也可以直接贡献到OpenLab。
3. 实例参考
实例参考:Yikun/hello-openlab#2
The text was updated successfully, but these errors were encountered: