Giter VIP home page Giter VIP logo

builder-config2's Introduction

KernelCi Builder Config

Ansible-based configuration for Linux kernel builders.

Some necessary files/directories are missing from this repository since they contain secrets. In order to make the ansible commands work, those files are necessary and need to be linked in the repository.

The host names in the hosts file are define and used only internally for the ansible configurations. The real host names and/or their IP addresses are stored in either the group_vars/ or host_vars/ directory.

Run the Configuration

To just go through all the tasks, useful to setup a new builder:

ansible-playbook -i hosts site.yml

This assumes that you have configured the host_vars/ and group_vars/ directories with all the necessary parameters from the builder-config-data repository.

Run only some specific tasks

If you need to run only a subset of all the tasks, you can limit the ones to run using the available tags:

ansible-playbook -i hosts site.yml --tags=$TAG,$TAG

For example:

ansible-playbook -i hosts site.yml --tags=mips,mirror

Run only on some builders

If you want to run the tasks only on a subset of the builders, you can limit which one ansible will access:

ansible-playbook -i hosts site.yml -l $HOST_NAME

For example:

ansible-playbook -i hosts site.yml -l kbuilder6,kbuilder7

Other Useful Commands

To check the facts on a host:

ansible -m setup -i hosts $HOST_GROUP_NAME

Running a simple command remotely

If you need to run a simple one-time command on the managed hosts:

ansible -i hosts -m raw -a "$SHELL_COMMAND" $HOST_GROUP_NAME

For example:

ansible -i hosts -m raw -a "rm -rf /srv/mirrors" linaro
ansible -i hosts -m raw -a "rm -rf /srv/mirrors" linaro -l kbuilder6,kbuilder7

The latter is limited to kbuilder6 and kbuilder7 only.

Other examples:

ansible -i hosts -m apt -a "name=$PACKAGE_NAME" linaro # Installs a single package across all "linaro" hosts

The -m switch enables to use a single ansible module from all the available ones.

Notes

  • The $HOST_GROUP_NAME name is the name given, between square brackets, in the hosts file to a group of hosts (i.e. [linaro]).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.