Git Product home page Git Product logo

assisted-installer-agent's Introduction

Assisted Installer Agent

Contents

This project contains several executables that are intended to work with the OpenShift Assisted Installer Service:

  • agent - This is the entry point of an assisted installation on the host side. It registers a host with the assisted installer service and starts next_step_runner.
  • next_step_runner - Polls the assisted installer service for next steps of an installation, and executes them.
  • inventory - Provides information about the host's inventory (CPU, memory, disk, network interfaces, etc.).
  • connectivity_check - Tests connectivity via NICs provided in the argument.
  • free_addresses - Detects free addresses in a subnet provided in the argument.
  • logs_sender - Packages system logs and uploads them to the server for troubleshooting.
  • dhcp_lease_allocate - Allocates IP addresses in DHCP. An assisted cluster needs several reserved IPs such as API VIP and ingress VIP.
  • apivip_check - Tests connectivity to the API VIP of the assisted cluster.

The project uses the ghw library to collect the inventory and generate a unique identifier (UUID) of the host that the agent is running on.

Agent Flags

  • --url: The URL of an assisted installer server, includes a schema and optionally a port.
  • --cluster-id: ID of the cluster the host will be connected to.
  • --agent-version: Version (full image reference) of the agent being run, used for diagnostic and upgrade purposes.
  • --interval: Interval in seconds between consecutive requests that the agent sends to the server. Default is 60.
  • --with-text-logging: Enable writing the agent logs to /var/log/agent.log. Default is true.
  • --with-journal-logging: Enable writing logs to systemd journal. Default is true.
  • --insecure: Skip certificate validation in case of HTTPS transport. Should be used only for testing. Default is false.
  • --cacert: Path to a custom CA certificate file in PEM format.
  • --help: Print help message and exit.

Packaging

By default, the executables are packaged in a container image quay.io/ocpmetal/assisted-installer-agent:latest. The executables inside the image reside under /usr/bin/.

Running

Since the agent is a statically linked go executable, it can be copied and run outside a container. If running outside a container, the agent must run as root. If running in a Podman container, the podman run command should be invoked with --net=host and --privileged.

The other tools can be invoked using podman run <flags> quay.io/ocpmetal/assisted-installer-agent:latest <executable>.

Dependencies

  • Docker (including Docker Compose) is used for subsystem testing, and is not required in runtime.
  • Skipper is used for building and testing. Can be installed with pip install strato-skipper.
  • Podman is the preferred container runtime to run the executables.

Building

To build the executables run: skipper make To build the container image run: skipper make build-image

Testing

For unit tests, run skipper make unit-test.

The subsystem tests use Docker Compose to run the agent and Wiremock stubs that simulate the assisted installer service. To perform the subsystem tests run skipper make subsystem.

WARNING: The subsystem tests can only run with the default image name and tag. You can build it locally just for this purpose.

To run selected system tests use a regular expression: skipper make subsystem FOCUS=register.

Publishing

To publish the container image run skipper make push. You can override the image name and tag via the ASSISTED_INSTALLER_AGENT variable.

assisted-installer-agent's People

Contributors

ori-amizur avatar dependabot[bot] avatar tsorya avatar yuvigold avatar omertuc avatar rollandf avatar empovit avatar danielerez avatar osherdp avatar eranco74 avatar jhernand avatar oshercc avatar eliorerz avatar avishayt avatar slaviered avatar ybettan avatar filanov avatar crystalchun avatar andfasano avatar jordigilh avatar yevgeny-shnaidman avatar adriengentil avatar javipolo avatar pawanpinjarkar avatar paul-maidment avatar mkowalski avatar lranjbar avatar openshift-bot avatar flaper87 avatar thiagoalessio avatar

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.