• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

SAP/InfraBox-cli: Command Line Interface for working with InfraBox, a continuous ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

SAP/InfraBox-cli

开源软件地址:

https://github.com/SAP/InfraBox-cli

开源编程语言:

Python 99.2%

开源软件介绍:

REUSE status

InfraBox CLI

With the InfraBox CLI you can run your InfraBox jobs on your local machine and configure your project.

Install

To install infraboxcli you need to have these requirements already installed:

  • git
  • docker
  • python & pip

Then simply run:

pip install infraboxcli

You can validate your installation by running:

infrabox version

List Jobs

If you have a more complex project it may be helpful to list all available jobs in it. For this you may use:

infrabox list

It outputs the names of all available jobs. An example output may look like this:

tutorial-1
tutorial-1/step1
tutorial-1/step2
tutorial-1/step3
tutorial-1/step4
tutorial-1/step5
tutorial-1/tutorial-1/step1/tests
tutorial-1/tutorial-1/step2/tests
tutorial-1/tutorial-1/step3/tests
tutorial-1/tutorial-1/step4/tests
tutorial-1/tutorial-1/step5/tests

Run a Job

InfraBox CLI may be used to run you jobs on your local machine. It will also respect all the dependencies and run the jobs in the correct order. Available options are:

usage: infrabox run [-h] [--no-rm] [-t TAG] [--local-cache LOCAL_CACHE]
                    [job_name]

positional arguments:
  job_name              Job name to execute

optional arguments:
  -h, --help            show this help message and exit
  --no-rm               Does not run 'docker-compose rm' before building
  -t TAG                Docker image tag
  --local-cache LOCAL_CACHE
                        Path to the local cache

To run all jobs defined in your infrabox.json file simply do:

infrabox run

In case you have multiple jobs defined an want to run only one of them you can do:

infrabox run <job-name>

Push a Job

To be able to use infrabox push you have to create a project in the InfraBox Dashboard and create an auth token for it.

Auth Token and InfraBox API Host must be set as environment variables.

export INFRABOX_CLI_TOKEN=<YOUR_ACCESS_TOKEN>
export INFRABOX_URL=<INFRABOX_URL>

To push your local project simply do:

infrabox push

This will compress your local project and upload it to InfraBox. Now you can open the InfraBox Dashboard and navigate to your project. You should see the jobs running on InfraBox.

You can also watch the console output of your pushed jobs locally. Just use the --show-console option.

infrabox push --show-console

Pull a Job

In case you would like to run a job which has been already executed on InfraBox you can use infrabox pull. It will download the docker container and all its inputs so you can the same container locally and investigate any issue.

infrabox pull --job-id <JOB_ID>

You can find the exact command for each job on the job detail page of InfraBox under Run local

Secrets

If you reference secrets in your job definition (i.e. as environment variable) then you can add a .infraboxsecrets.json file to your project right next to the .infrabox.json file. This file should then contain all your secrets referenced in your job definition as a simple object:

{
    "SECRET_NAME1": "my secret value",
    "Another secret": "another value"
}

How to get support

If you need help please post your questions to Stack Overflow. In case you found a bug please open a Github Issue. Follow us on Twitter: @Infra_Box or have look at our Slack channel infrabox.slack.com.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap