elbb / elbb-dev-environment

Apache License 2.0
0 stars 0 forks source link

(e)mbedded (l)inux (b)uilding (b)locks - development environment

Generel

This repository contains tools, services and information which might be helpful or needed to develop software in elbb context:

Prerequisites

Local Concourse CI environment

This environment contains a Concourse CI server, a docker registry and a MinIO server that can be used for local development.

The environment can be started using dobi:

./dobi.sh concourse-start

The environment can also be stopped using dobi:

./dobi.sh concourse-stop

When the environment is started, docker volumes for Concourse database, MinIO and docker registry are created and used by these services. This has the advantage, that the history is kept after a restart of the Concourse environment.

To set a Concourse environment to the default state, this can also be done with dobi:

./dobi.sh concourse-clean

Concourse CI server

General

This environment has a local instance of a concourse CI server.

Usage

The Concourse CI server can be reached via your local browser.

Example

http://localhost:8080

MinIO server

General

Minio is an object storage server that contains the same public API as Amazon S3. This means that applications that can interact with Amazon S3, can be configured to interact with Minio in this local environment.

Usage

http://localhost:9000

Example

A good starting point to work with the MinIO server, please read the offical documentation. https://github.com/minio/minio#explore-further

docker registry

General

If you create your own docker images, you may also need a registry to manage them. The local registry is intended for the development phase, before the generated images are published on services like Docker Hub.

Usage

Example

A small example explains the sequence.

First we get an official image of the "bash" from Docker Hub.

docker pull bash:latest

Then we generate a Test-Tag and push it to our local server.

docker tag bash:latest localhost:5000/test_bash
docker push localhost:5000/test_bash

To check if the created image is available in the local registry, the registry-cleanup tool can be used.

Notes on operation:

docker run --rm -it elbb/registry-cleanup -help

Access to the local docker registry using :

DOCKER_HOST_IP=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+')
docker run --rm -it elbb/registry-cleanup -address http://${DOCKER_HOST_IP}:5000

Local (Conan) Artifactory Community Edition for C/C++

If you want to use or deploy your own conan packages in your concourse pipeline you need a reachable "Artifactory Community Edition for C/C++". This Toolset contains a preprovisioned one with default credentials. Don't use it for production purposes! You can start the local "Artifactory Community Edition for C/C++" via

./dobi.sh artifactory-cpp-ce-start

It can be stopped via

./dobi.sh artifactory-cpp-ce-stop

You can reset the "Artifactory ce for C/C++" environment to the default state via

./dobi.sh artifactory-cpp-ce-clean

Usage

Usage from concourse environment

"Artifactory CE for C/C++" is reachable within a concourse pipeline via name "artifactory-cpp-ce" with the default ports 8081/8082.

Codechecker

If you like to store and view your static code analysies reports from "Clang Tidy" and "Clang Static Analyzer", you can use the Codechecker web server.

You can start the local "Codechecker web server" via

dobi.sh codechecker-web-start

It can be stopped via

dobi.sh codechecker-web-stop

You can reset the "Codechecker Web Server" environment to the default state via

./dobi.sh codechecker-web-clean

Usage

http://localhost:8001

Configuration/Adaption of your dev environment

If you have local port conflicts when using the concourse or artifactory environment, you can adapt these. Copy ./local.env.template to ./local.env and edit ./local.env accordingly.
./local.env is ignored by git via ./.gitignore.

Furthermore you can configure the used docker network and version of dependencies like concourse etc..

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Copyright (c) 2020 conplement AG