Граф коммитов

18 Коммитов

Автор SHA1 Сообщение Дата
Jarek Potiuk 8bd15ef634
Switches to Helm Chart for Kubernetes tests (#9468)
The Kubernetes tests are now run using Helm chart
rather than the custom templates we used to have.

The Helm Chart uses locally build production image
so the tests are testing not only Airflow but also
Helm Chart and a Production image - all at the
same time. Later on we will add more tests
covering more functionalities of both Helm Chart
and Production Image. This is the first step to
get all of those bundle together and become
testable.

This change introduces also 'shell' sub-command
for Breeze's kind-cluster command and
EMBEDDED_DAGS build args for production image -
both of them useful to run the Kubernetes tests
more easily - without building two images
and with an easy-to-iterate-over-tests
shell command - which works without any
other development environment.

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: Daniel Imberman <daniel@astronomer.io>
2020-07-01 14:50:30 +02:00
Jarek Potiuk 6aabd9a86e
More sensible docker caching strategy for Prod images (#9547)
Local caching is now default strategy when building
the Production image.

You can still change it to pulled - similar to CI builds
by providing the right build flag and this is what
is used in CI by default. The flags in Breeze are now updated
to be more eplanatory and friendly (build-cache-*) and a flag
for "disabled" cache option is added as well.

Also the Dockerfile and Dockerfile.ci files are not needed
any more in the docker context. They used to be needed when
we built the Kubernetes image in the container, but since
we are now using production image directly - we do not need
them any nmore.

Combining setting the default strategy to local and removing
the Dockerfile from the context has the nice effect that you
can iterate much faster on the Production image without
triggering rebuilds of half of the docker image
as soon as the Dockerfile changes.
2020-06-28 17:38:17 +02:00
Jarek Potiuk cf510a30fb
Make Production Dockerfile OpenShift-compatible (#9545)
OpenShift (and other Kubernetes platforms) often use the approach
that they start containers with random user and root group. This is
described in the https://docs.openshift.com/container-platform/3.7/creating_images/guidelines.html

All the files created by the "airflow" user are now belonging to
'root' group and the root group has the same access to those
files as the Airflow user.

Additionally, the random user gets automatically added
/etc/passwd entry which is name 'default'. The name of the user
can be set by setting the USER_NAME variable when starting the
container.

Closes #9248
Closes #8706
2020-06-27 14:29:55 +02:00
Jarek Potiuk 07f12e5f9f
Fixed rendering of IMAGES.rst (#9433) 2020-06-20 11:10:46 +02:00
Jarek Potiuk 7c12a9d4e0
Improve production image iteration speed (#9162)
For a long time the way how entrypoint worked in ci scripts
was wrong. The way it worked was convoluted and short of black
magic. This did not allow to pass multiple test targets and
required separate execute command scripts in Breeze.

This is all now straightened out and both production and
CI image are always using the right entrypoint by default
and we can simply pass parameters to the image as usual without
escaping strings.

This also allowed to remove some breeze commands and
change names of several flags in Breeze to make them more
meaningful.

Both CI and PROD image have now embedded scripts for log
cleaning.

History of image releases is added for 1.10.10-*
alpha quality images.
2020-06-16 12:36:46 +02:00
Jarek Potiuk 696e74594f
Fix broken CI image optimisation (#9313)
The commit 5918efc86a broke
optimisation of the CI image - using the Apache Airflow
master branch as a base package installation source from PyPI.

This commit restores it including removal of the
obsolete CI_OPTIMISED arg - as now we have a separate
production and CI image and CI image is by default
CI_OPTIMISED
2020-06-16 00:38:55 +01:00
zikun 82c8343ab6
Support additional apt dependencies (#9189)
* Add ADDITONAL_DEV_DEPS and ADDITONAL_RUNTIME_DEPS

* Add examples for additional apt dev and runtime dependencies

* Update comment

* Fix typo
2020-06-09 23:05:43 +02:00
Jarek Potiuk ff5dcccbbd
Kubernetes Cluster is started on host not in the container (#8265)
Tests requiring Kubernetes Cluster are now moved out of
the regular CI tests and moved to "kubernetes_tests" folder
so that they can be run entirely on host without having
the CI image built at all. They use production image
to run the tests on KinD cluster and we add tooling
to start/stop/deploy the application to the KinD cluster
automatically - for both CI testing and local development.

This is a pre-requisite to convert the tests to convert the
tests to use the official Helm Chart and Docker images or
Apache Airflow.

It closes #8782
2020-06-03 20:58:38 +02:00
Jarek Potiuk b7b48463b1
Updated missing parameters for docker image building (#9039) 2020-06-02 09:27:09 +02:00
Fabian 5a7a3d13ee
Add ADDITIONAL_AIRFLOW_EXTRAS (#9032)
* Add build-arg ADDITIONAL_AIRFLOW_EXTRAS

* Add ADDITIONAL_AIRFLOW_EXTRAS example and description
2020-05-27 12:58:59 +02:00
Fabian 6fc555d0bc Add ADDITIONAL_PYTHON_DEPS (#9031)
* add build-arg ADDITIONAL_PYTHON_DEPS

* Add ADDITIONAL_PYTHON_DEPS example and description

Co-authored-by: Fabian Witt <fabian.witt@redheads.de>
2020-05-27 11:52:26 +02:00
Jarek Potiuk 1fb9f0722a
Synchronize extras between airflow and providers (#8819) 2020-05-11 19:25:15 +02:00
Jarek Potiuk d70303c8ba
Bash command for production image (#8579) 2020-04-27 12:14:57 +02:00
Jarek Potiuk bd7f63b39f
Get rid of Travis CI from the docs (#8488) 2020-04-21 17:27:09 +02:00
Felix Uellendall cf6c254ebd
Expose Airflow Webserver Port in Production Docker Image (#8228) 2020-04-15 13:05:02 +02:00
Jarek Potiuk 4e8a979d03
Docker image build include now releses 1.10.10 version (#8234)
It also installs properly on Mac as well as it auto-detects
if yarn prod is needed - based on presence of proper
package.json in either www or www_rbac which makes it simpler
for remote installations.
2020-04-10 15:07:15 +02:00
Kaxil Naik f177bb606e
Add backticks in IMAGES.rst command description (#8075) 2020-04-02 19:31:20 +01:00
Jarek Potiuk 07fd0d71c8
Add Production Docker image support (#7832) 2020-04-02 18:52:11 +01:00