When a compose is started the api call is no longer handled by the CreateImageWizard onSave function. Instead, the CreateImageWizard calls the composeStart thunk. This function calls the api and handles the response. If successful, the compose is added to the store. Otherwise, an error is added to the store. The store's compose object now has a list of the compose ids and an object containing key/value pairs mapping a compose id to the compose for all composes. This "normalized" state will allow more efficiency when selecting individual composes or iterating through all composes. The compose objects in the store now match the composeRequest object instead of having a shape unique to the UI. This can be changed in the future if image-builder's api returns compose objects of a different format. Tests are updated for new compose format and action/reducer types. |
||
|---|---|---|
| .github/workflows | ||
| .travis | ||
| config | ||
| profiles | ||
| src | ||
| tools | ||
| .babelrc | ||
| .eslintrc.yml | ||
| .gitignore | ||
| .stylelintrc.json | ||
| .travis.yml | ||
| codecov.yml | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
image-builder-frontend
Development
You can skip step 3 and 4 if you don't need the full stack locally. However while it's possible to click around the page and use mock data, it won't be able to build images.
-
Clone the following repositories:
-
Setting up the proxy
Choose a runner (podman or docker), and point the SPANDX_CONFIG variable to profile/local-frontend-and-api-with-identity.js included in image-builder-frontend.
sudo insights-proxy/scripts/patch-etc-hosts.sh export RUNNER="podman" export SPANDX_CONFIG=$PATH_TO/image-builder-frontend/profiles/local-frontend-and-api-with-identity.js sudo -E insights-proxy/scripts/run.sh -
Setting up osbuild-composer(-api)
The easiest way to do this is to call
schutzbots/provision-composer.shfrom theosbuild/image-builderproject. This will install composer, generate the needed certs, and put the configuration in place. -
Starting up image-builder
Point the URL to wherever composer is hosted, the client certificates and CA should be reused or copied over from the composer host, they're located in
/etc/osbuild-composer.In the image-builder checkout directory
make build OSBUILD_URL="https://$composer-url:$composer-port/api/composer/v1" \ OSBUILD_CERT_PATH=/path/to/client-crt.pem \ OSBUILD_KEY_PATH=/path/to/client-key.pem \ OSBUILD_CA_PATH=/path/to/ca-crt.pem \ ./image-builder -
Starting up image-builder-frontend
In the image-builder-frontend checkout directory
npm install npm start
The UI should be running on https://prod.foo.redhat.com:1337/apps/image-builder/landing, the api (image-builder) on https://prod.foo.redhat.com:1337/api/image-builder/v1/openapi.json