arcalot / arcaflow-container-toolkit Goto Github PK
View Code? Open in Web Editor NEWACT - The Arcaflow Container Toolkit
License: Apache License 2.0
ACT - The Arcaflow Container Toolkit
License: Apache License 2.0
After updating the kubeconfig plugin main branch with a PR, the new build automation successfully pushed a new container image with a commit tag, but the latest
tag has not updated to point to a new build from the latest main code.
https://quay.io/repository/arcalot/arcaflow-plugin-kubeconfig?tab=tags
In a build of sysbench from a development branch update, the Carpenter automation failed to push containers to either ghcr or quay.
Currently unsure how to reproduce the failure.
Failed build action: https://github.com/arcalot/arcaflow-plugin-sysbench/actions/runs/4416765995/jobs/7741514163#step:6:679
Will it fail if the Docker Server is not running and listening on the default socket?
Originally posted by @janosdebugs in #21 (comment)
Because the carpenter container will be run very frequently in different environments via automation, we should try to minimize the container's size while maximizing its performance.
I would like to see the current README replaced with a guide for first-time users of Carpenter to publish their own plugin.
Plugins in other organizations and/or CI systems.
I would like to see Carpenter to be simplified to the point where a new plugin project can be set up without a template from scratch in less than 5 steps and less than 2 minutes, ideally without additional config files. The usage of Carpenter should be intuitive and should not require reading more than 2 screens of documentation. Carpenter should be able to, at the very least, build a plugin image (if not push it) without specifying any configuration file simply by specifying the image name. Carpenter should detect the project type (based on go.mod, requirements.txt, or pyproject.toml, figure out the correct dependency manager to use) and apply the appropriate Dockerfile automatically. Carpenter should accept the --push
flag to push to the registry and prompt the user for credentials if credentials are required but have not been provided.
I would like to see non-Arcalot projects that are running on other CI platforms enabled to quickly and easily spin up new plugin projects.
If multi-arch is not enabled in a workflow, the resulting release build pushed to quay.io does not have the :latest tag linked to the release tag.
There are a few things that would need to change in the project itself. Most of the changes will happen in the workflows and the repository's of the plugins as well in the "how" they implement carpenter
Ensure that the given plugin is a valid Python plugin.
src
directory that has the same filename in the pyproject.toml at the pyproject.project.name
, or tool.poetry.name
, key values.This is to enforce some similarity in the directory structure of our Python plugins, and to facilitate publishing them to a public Python package repository, like pypi.
This will be needed by a few teams that have a use case for the image to live outside of the arcalot repository in quay.
ACT should support building plugin container images for multiple architectures. Specifically ARM aarch64 is needed for existing use cases.
Automatic plugin builds in aarch64 compatible formats will enable direct use of plugins and workflows in ARM environments.
This is critical for the chaos use case.
When container builds for tags other than releases or latest are created, they are supposed to have an expiration date in quay.io set. Currently, those expiration dates don't seem to be getting set.
Push changes to a development branch of a plugin that uses the ACT workflow. This should trigger a container build and push to quay.io, and you should see that the expiration date is not set.
https://quay.io/repository/arcalot/arcaflow-plugin-sysbench?tab=tags
Stabilize build system api, and release it as a golang package.
cmd
code to another sub-packageAs an optional feature, Carpenter should probably integrate Arcaflow-DocsGen to keep a README.md or similar updated. The feature should be optional and the markdown file should be configurable.
Keep the documentation for plugins updated.
Arcaflow-DocsGen is early in development and should be considered carefully.
If a Python plugin uses a typical directory structure for a Python package, Carpenter cannot determine the programming language of that plugin, throws an error, and causes the plugin's image build to fail.
$ tree .
.
├── arcaflow_plugin_template_python
│ └── example_plugin.py
├── docker-compose.yaml
├── Dockerfile
├── example.yaml
├── LICENSE
├── poetry.lock
├── pyproject.toml
├── README.md
├── requirements.txt
└── tests
└── test_example_plugin.py
$ docker build --tag plugin-template .
$ cat example.yaml | docker run --rm -i plugin-template --debug -f -
output_id: success
output_data:
message: Hello, John Doe!
Building with the plugin image builder
docker run --rm -e=IMAGE_TAG="0.3.0" -e=IMAGE_NAME="arcaflow-plugin-template-python" -v /var/run/docker.sock:/var/run/docker.sock:z -v $HOME/workspace/arcaflow/arcaflow-plugin-template-python:/github/workspace carpenter build -v --build
2022-12-01T21:38:11Z info Using config file:/.carpenter.yaml
2022-12-01T21:38:11Z info
2022-12-01T21:38:11Z info
2022-12-01T21:38:11Z info GITHUB_NAMESPACE not set
2022-12-01T21:38:11Z info
2022-12-01T21:38:11Z info
2022-12-01T21:38:11Z info
panic: runtime error: slice bounds out of range [1:0]
goroutine 1 [running]:
go.arcalot.io/imagebuilder/internal/requirements.ImageLanguage({0xc0000c3e00, 0x10, 0x0?})
/build/internal/requirements/containerfile.go:69 +0x2a5
go.arcalot.io/imagebuilder/internal/requirements.LanguageRequirements({0xc00010f848, 0x11}, {0xc0000c3e00, 0x10, 0x10}, {0xc00002a00b, 0x1f}, {0xc00002800a, 0x5}, {0xa5caa0, ...}, ...)
/build/internal/requirements/common.go:25 +0x6e
go.arcalot.io/imagebuilder/internal/carpentry.Carpentry(0x0?, 0x0?, {0xa5bfe0, 0xc000328c10}, {{0xc0002eac60, 0x8}, {0xc00002a00b, 0x1f}, {0xc00010f848, 0x11}, ...}, ...)
/build/internal/carpentry/carpentry.go:31 +0x158
go.arcalot.io/imagebuilder/internal/carpentry.CliCarpentry(0x0?, 0x0?, {0xa5caa0, 0xc0002f7080}, {0x983783, 0x6})
/build/internal/carpentry/carpentry.go:89 +0x4dc
go.arcalot.io/imagebuilder/cmd.glob..func1(0xd3e9c0?, {0x982d1d?, 0x2?, 0x2?})
/build/cmd/build.go:25 +0x46
github.com/spf13/cobra.(*Command).execute(0xd3e9c0, {0xc000270e00, 0x2, 0x2})
/go/pkg/mod/github.com/spf13/[email protected]/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0xd3eca0)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:1044 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:968
go.arcalot.io/imagebuilder/cmd.Execute()
/build/cmd/root.go:41 +0x25
main.main()
/build/carpenter.go:9 +0x17
The README.md
file gives the following instructions for building:
Build the builder
- golang v1.17
- current working directory is this project's root directory
go build build.goIf successful, this will result in the arcaflow-plugin-image-builder executable, and it will be named
build
in your current working directory.
But when running it on a RHEL 8 system you'll get:
$ go build build.go
no required module provides package build.go; to add it:
go get build.go
$ go version
go version go1.17.12 linux/amd64
Clone the repository and follow instructions in README.md
--atp
golang plugin sdkThe Go SDK should be able to handle the communication if needed.
Originally posted by @janosdebugs in #21 (comment)
Note for later: we should make these requirements part of a more strict set which is only applied if people want to contribute official plugins. For their own plugins people can label them as they please.
Originally posted by @janosdebugs in #21 (comment)
When following the documentation here, Carpenter outputs a super unhelpful bunch of error messages:
# docker run \
> --rm \
> -e=IMAGE_NAME=example-plugin \
> -e=IMAGE_TAG=latest \
> --volume /var/run/docker.sock:/var/run/docker.sock:z \
> --volume $PWD/:/github/workspace \
> ghcr.io/arcalot/arcaflow-plugin-image-builder:v0.3.0 \
> build --build
Unable to find image 'ghcr.io/arcalot/arcaflow-plugin-image-builder:v0.3.0' locally
v0.3.0: Pulling from arcalot/arcaflow-plugin-image-builder
e92ac2adfcb0: Pull complete
5199db4ecb15: Pull complete
ff3f6419bc6e: Pull complete
5617940ba71c: Pull complete
541c2799b994: Pull complete
401e9d30e2d8: Pull complete
Digest: sha256:1a8f906f4b27d6a798f4ca18876f6497e43acff328c26bef837f33f24dff68d0
Status: Downloaded newer image for ghcr.io/arcalot/arcaflow-plugin-image-builder:v0.3.0
2023-03-22T10:10:49Z info Using config file:/.carpenter.yaml
2023-03-22T10:10:49Z info GITHUB_USERNAME not set
2023-03-22T10:10:49Z info GITHUB_PASSWORD not set
2023-03-22T10:10:49Z info GITHUB_NAMESPACE not set
2023-03-22T10:10:49Z info not set
2023-03-22T10:10:49Z info Missing credentials for ghcr.io
2023-03-22T10:10:49Z info QUAY_USERNAME not set
2023-03-22T10:10:49Z info QUAY_PASSWORD not set
2023-03-22T10:10:49Z info QUAY_NAMESPACE not set
2023-03-22T10:10:49Z info QUAY_CUSTOM_NAMESPACE not set
2023-03-22T10:10:49Z info Missing credentials for quay.io
2023-03-22T10:10:49Z info Missing README.md
2023-03-22T10:10:49Z info Missing Dockerfile
2023-03-22T10:10:49Z info Missing a test file
2023-03-22T10:10:49Z info Missing Dockerfile
plugin.py
2023/03/22 10:10:49 failed requirements check, not building: example-plugin latest
Run Carpenter in an empty directory with th ecommand line described above.
info
(e.g. GITHUB_USERNAME not set
). This is confusing for the user because it is unclear if this is a problem.In its current state, Carpenter is not usable for non-Arcalot projects, it is way too hard to use.
arcaflow-plugin-image-builder
action is not failing if the image is not built due to missing conditions.
2022-10-12T05:43:41Z info Missing pyproject.toml
2022-10-12T05:43:42Z info Failed requirements check, not building: arcaflow-plugin-template-python latest
As we expect the action to perform a build, it should fail if the build is skipped on failed requirements check
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.