Skip to content

Attach an Agent to the LibreCores CI Cloud

Stefan Wallentowitz edited this page Jun 1, 2017 · 4 revisions

Prepare the host

  1. Install docker, e.g., https://store.docker.com/editions/community/docker-ce-server-ubuntu

  2. Install python3 pip, e.g., apt install -y python3 python3-pip

  3. Install the LibreCores CI tool: pip3 install lcci

Install the tools

We use environment modules in the agents, so that you need to prepare a valid tools volume. This volume is a local folder that you are automatically installing the tools (programs and libraries) to. The installation is automated by docker containers, so that we can ensure the same environment on every agent. The installer docker containers install the tools along with the modulefiles in this volume and the agents than use this volume.

First, lets configure the lcci tool. Depending on how much you use it, the Github API's rate limiting may unfortunately become an issue as the tool fetches all metadata from Github. You can create multiple access token for different uses. You need to go to your account's settings page and from there navigate to the "Developer Settings"-"Personal Access Tokens" page. Click "Generate New Token" and then give a "Token Description" such as "LibreCores CI Tool". You only need to grant the access scope "public_repo".

Now you create a new configuration file /etc/lcci.yml with your token and pointing to the modules folder:

main:
  github-api-token: <your-token>

volumes:
  /tools: /path/to/your/tools

Next you can run the lcci tool for the first time to list all available tools

lcci tools list

You can now either install individual tools in a specific version, e.g.,

lcci tools install verilator:3.902

Alternatively, you can install a whole bundle of tools in fixed common versions needed to fulfill a certain LibreCores CI release level:

lcci tools install 2017.1

Register an agent

Currently, this is a manual step. Please get in touch with us at [email protected]

You will receive an agent-id and its secret.

Configuring and starting an agent

Update your configuration at /etc/lcci.yml:

agents:
  <agent-name>:
    type: modules
    agent-id: <agent-id>
    agent-secret: <agent-secret>

This creates the default agent type and you can set the name freely (we suggest using the agent-id for now).

Now you can launch the agent:

lcci agent start <agent-name>

Done!