734 Commits

Author SHA1 Message Date
Prateek Dodda
e066274b8b Implement Security Context for Airflow_Scheduler
This adds the container security context to set readOnlyRootFilesystem
to true

Change-Id: Ia9cad50decfcf9638e8fc1cf5d652ee72d978a40
2020-04-24 17:03:24 -05:00
Phil Sphicas
c8c8934c77 Armada DAG: increase retries from 3 to 5
The current Armada DAG allows for 3 retries, reduced from 10 here:
bef8eecac1

This is sometimes insufficient, especially in cases where chart updates
of underlying Airship or Kubernetes components are upgraded and pods are
restarted underneath the airflow workers. The chart installation may be
successful, but an Armada retry may still be consumed.

This change increases the number of retries to 5. This will allow Armada
to progress further through the manifest if there is a disruption after
a chart is successfully installed. The tradeoff is that Armada may try
to repeatedly install a chart that keeps failing in the same way,
delaying the ultimate failure of the deployment.

Change-Id: I1fad7b1d95af061595680a76d24c6d323b365a67
2020-04-23 20:33:58 +00:00
Ahmad Mahmoudi
0091670583 (fix) Updated WTForms and cleaned psycopg2
1. Locked the WTForms to 2.2.1 to address the import issue with
   wtforms.widgets.HTMLString. WTForms 2.3.0 was released on
   April 21/2020. This release causes shipyard gate fail with
   import error for wtforms.widgets.HTMLString.
2. Deleted psycopg2==2.7.7, which is installed as a dependency of
   apache-airflow extra package postgres, and resoted the newer
   release psycopg2-binary==2.8.4, to be used instead.

Change-Id: I303a2c94ec409e97af1192ae892b8148fcdbb8d5
2020-04-22 17:06:08 +00:00
Zuul
ec46396487 Merge "Upgrade apache-airflow to 1.10.5" 2020-04-02 15:50:09 +00:00
Zuul
8b6bd94410 Merge "Implement Security Context for Airflow_Worker" 2020-04-02 13:32:14 +00:00
Prateek Dodda
cc0bfac0c2 Implement Security Context for Airflow_Worker
This adds the container security context to set
readOnlyRootFilesystem to true

Depends-on: https://review.opendev.org/#/c/708948/2
Change-Id: I4c7e7dba26d6bdfd0032a31469fd1777ae06cfec
2020-03-31 14:14:03 +00:00
Ahmad Mahmoudi
df751e302c Upgrade apache-airflow to 1.10.5
Upgraded apache-airflow to 1.10.5 to address the database migration issue
https://issues.apache.org/jira/browse/AIRFLOW-6046.

Change-Id: Ib8678cddb2deb4f5ef944d026e0d2633a326d9cc
2020-03-30 05:21:31 +00:00
Drew Walters
5b1af08d32 Add SECURITY.md
All Airship projects are moving to GitHub issues. This change adds a
GitHub security policy that links to the official Airship vulnerability
management process [0]. When users on GitHub click "New Issue" on this
GitHub repository, they will see an option to report a security
vulnerability, which will direct them to our official policy.

[0] https://airship-docs.readthedocs.io/en/latest/security/vulnerabilities.html

Change-Id: Iaf060dd0085c21f0c4f18f100e3e053b5ceedbed
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-03-26 21:03:00 +00:00
KHIYANI, RAHUL (rk0850)
29824c78b4 [Fix] Fixing shipyard endpoints path name
fixing path helm-toolkit to shipyard

PS: https://review.opendev.org/#/c/671575/16

Change-Id: I73bf30e0c27365802b730d27e6ecfd28092de24e
2020-03-18 23:08:33 -05:00
Ahmad Mahmoudi
70410cc478 (fix) Address image build issues, bionic
- With bionic image based shipyard docker images, uwsgi crashes
  with segmentation fault, when it tries to load the psycopg2 library,
  causing the api become unreachable on both shipyard docker images.
  This happens because psycopg2 2.7.x and uwsgi binary wheels are built
  with incompatible ssl libraries. This patch upgrades psycopg2 to the
  latest release to address this issue.

- The existing image build script cannot run in a docker or a pod,
  based pipeline because of two reasons:
  - The build script runs a docker (docker-in-docker) and mounts a
    volume.
    In a dind case, volume bind mounts will not work, because the nested
    container will need the host file system's path for the source path.
  - The shipyard service listens to its exposed service port in the
    nested docker network namespace, which is not reachable from the host
    pod/container.
This patch address both of the above issues. It first creates the
container, copies needed config files to the container and then starts
it. Also it execs into the nested docker to access the shipyard services
in a dind (docker-in-dcoker) case.

Change-Id: Ifdfed539babab01608bfaef37001bb79cd3a080d
2020-03-10 03:23:05 +00:00
Zuul
30f3a989c7 Merge "Adding default apparmor profile to shipyard components" 2020-02-19 14:28:54 +00:00
NarlaSandeepNarlaSaibaba
5aa0cde5f0 Adding default apparmor profile to shipyard components
Change-Id: Idfc103c85bc95c8cd0a48aa0c18a17a4b1d12d3f
2020-02-17 09:52:37 -06:00
Drew Walters
dfa51979c2 CI: Fix airskiff node name
The airskiff job is looking for a node named "Ubuntu-Bionic", but the
only node available in its nodeset is "primary". This change updates the
playbook to use the proper name.

Change-Id: Ib3a8de0918c7a9e5abb7fb71a20ae261f68b3259
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-02-12 18:10:43 +00:00
Ahmad Mahmoudi
3d987309b8 Locked Werkzeug package release to 0.16.1
The latest Werkzeug package release 1.0.0, released on February 8,
is not backwards compatible with the earler releases of this package,
which is used in Flask, used by apache airflow.

This causes shipyard make image job fail, with missing import errors
from the Werkzeug library.

This change locks the Werkzeuz package release to the last compatible
release with the apache airflow in shipyard.

Change-Id: I54dad4ccc1858f4d5986c6e8e9fbf8f5d9847158
2020-02-12 01:23:15 +00:00
Ahmad Mahmoudi
24f6a01e0b Add support for Ubuntu bionic base image
Added support to buid shipyard and airflow images using either a xenial
or Ubuntu bionic base image.
The default base image is set to bionic.

Change-Id: I6ad4d42dede081586b3ccea87a42e250979ac106
2020-02-04 13:38:39 -06:00
Zuul
72ca47e5c9 Merge "Allow to configure service network policy" 2019-11-05 15:51:30 +00:00
Evgeny L
a9fc62e31f Allow to configure service network policy
The patch introduces network policy configuration similar
to openstack-helm services. It allows users to configure
policies depending on the environment.

* Network policies are disabled by default.
* When enabled default policies allow all ingress and
  egress traffic (i.e. policy set to {}), this may be
  changed in future patch-sets.

Change-Id: Ic0b44eb142445d45d81e3e546d394e1c7b451238
2019-11-04 18:49:11 +00:00
Sean Eagan
6051476cd5 Full clone of osh-infra to fix htk pinning
Depth 1 clone does not pull the pinned htk version, so resetting
to that version was failing, leaving master in place.

Change-Id: Ice638d429b7051023a381e97df1334d406903f9e
2019-11-01 10:08:14 -05:00
Daniel Pawlik
1fc6829de8 Fix airskiff deployment
Change-Id: I800200e851a8c896696dbc97b56a8c997ff716ea
2019-10-25 11:49:25 +00:00
Ahmad Mahmoudi
f0f876afef (airflow) - Apache airflow uplift to 1.10.4
Updated airflow config and Dockerfiles for apache airflow 1.10.4
For details see: https://github.com/apache/airflow/blob/master/UPDATING.md

Also updated the kubectl to 1.16.2, as part of kubernetes 1.16 uplift.

Change-Id: Ib24ff0304b6279ff0be749141854d6a604473597
2019-10-22 14:46:57 +00:00
Zuul
0cbb5cf9b7 Merge "Use apps/v1 k8s controllers and add labels" 2019-10-08 20:43:24 +00:00
Roman Gorshunov
c65a93a895 Change URLs to opendev.org due to migration
Change URLs from git.openstack.org & github.com to opendev.org due to the
migration; wrap multiple LABELs into one.

Change-Id: I240fa6f746bd1e424e5a2b7fd381903c46059ae5
2019-10-07 18:59:45 +02:00
Ahmad Mahmoudi
e6c7a6e1a5 (airflow) - Requirements update for apache airflow
Updated airflow requirements list needed for apache airflow 1.10.4 and later.

Change-Id: I142e46e4fa202d216287ea2f663bd4811e47f0ba
2019-10-03 09:11:51 -05:00
Hemanth Nakkina
0de9209ca1 Use apps/v1 k8s controllers and add labels
Update apiversion for ClusterRole, ClusterRoleBinding to rbac.authorization.k8s.io/v1
Update apiversion for deployment to apps/v1
Update apiversion for statefulset to apps/v1
Add selector match labels to deployment

This patch is similar to https://review.opendev.org/#/c/638276/
These changes are required to install shipyard helm chart on k8s 1.16.0

Change-Id: I7ac6fc060fbd6a5feea747ebbe8121c5a2eb4b6f
2019-10-02 14:25:06 +00:00
Roman Gorshunov
7430cc5869 Update pytest and pin amqp version to previous one
- Pytest reference [0]
- amqp reference [1]

[0] https://github.com/pytest-dev/pytest/issues/3280
[1] b51d1d678e

Change-Id: I676f54abf27e27646ae9ded4f1c2648824b047c9
2019-10-02 15:22:00 +02:00
Ahmad Mahmoudi
f42e85d7ce (airflow) - Added no_proxy env variable
Added no_proxy environment variable to be able to reach internal
repos when http_proxy is used.

Change-Id: If23fb644bfc2a6486e9089ad5ca1eb21f81e7df6
2019-09-19 17:56:55 +00:00
Bryan Strassner
fe87c64f97 Update help docs for actions in Shipyard Client
- Adds the information related to the test_site action.
- Reformats, slightly, the output from 'shipyard help actions'
- Adds tests that use an externalized list of actions to keep the help
documentation in alignment with the actions supported in the API.

Change-Id: I2efd473da0dbf6c8cbadfc9fae575c303996c43b
2019-09-17 16:48:56 +00:00
Zuul
f1c193a232 Merge "(airflow) - Updated deckhand reference" 2019-09-16 19:28:16 +00:00
Ahmad Mahmoudi
815eef7f5d (airflow) - Updated deckhand reference
Updated deckhand commit id, because apache airflow release 1.10.3 and
later use flask >=1.1.0, which needs Werkzeug library version >=0.15.0.
see: https://issues.apache.org/jira/browse/AIRFLOW-4900

The updated deckhand commit lets the Werkzeug package float to >=0.15.0.

Change-Id: I62d7f4e5eecb2f05035a1c9552544aa65e70ee3f
2019-09-16 14:55:44 +00:00
Carter, Matt (mc981n)
1e1fc065b8 Enhance/fix logging in document validator
Change-Id: Ie600986597143f51908005ec655ba78496ca4cd9
2019-09-14 06:58:56 +00:00
Drew Walters
b1ae6dee45 CI: Update Airskiff full-site manifest location
The location of the Airskiff site recently changed [0], causing the
Airskiff job to fail. This change updates the "reduce site" playbook to
match the job in treasuremap, thereby avoiding the directory which no
longer exists.

The change also removes the usage of install-packages script, because
it was removed [1].

[0] https://review.opendev.org/674963
[1] https://review.opendev.org/672540

Change-Id: I7b20ff7c50cfa085039e893558df2cf022c4333c
Signed-off-by: Drew Walters <andrew.walters@att.com>
2019-09-13 20:24:13 +00:00
Scott Hussey
185dc9823c (airflow) Configure source of Airflow pkg
- Allow a Docker build-arg to specify the source of the Airflow
  python package in any format supported by pip

Change-Id: Ifa2dd62d91570035cff91ff07868b0fcf659add8
2019-09-13 11:09:18 -05:00
Evgeny L
c21555fce0 Use a direct connectivity to RabbitMQ
This patch makes Celery to connect to RabbitMQ directly instead
of using LB. It also brings a forked version of a transport url
template, the reason for this is the format for Kombu/Celery
broker url is different from oslo_messaging transport url:
1. URLs need to be separated with semicolons vs commas.
2. Every item in Kombu broker url needs to be a complete url
   that includes schema, vhost, and all credentials.

This format is specific to Airflow and is not used in upstream
OSH projects, hence it is included here and not in htk.

Depends-On: I5150a64bd29fa062e30496c1f2127de138322863
Change-Id: I0b4ae6a9538f2f6988ed42c8f5cf0a54e7a7ad2e
2019-08-28 23:38:59 +00:00
Evgeny L
fed3407634 Fix opensuse image build gate
Gate started to fail with:
    /bin/sh: /usr/bin/python3: Permission denied

Related changes in other projects:
    armada: https://review.opendev.org/#/c/676806/
    pegleg: https://review.opendev.org/#/c/676944/

Change-Id: I66d1ea3af18b7007411d5851df48c61d5d429e17
2019-08-28 20:24:01 +00:00
Zuul
9c5f68cf97 Merge "Add support domain-scoped token for CLI" 2019-08-07 22:34:14 +00:00
Zuul
c17d13e848 Merge "Update OpenStack api-ref location" 2019-08-07 15:06:24 +00:00
Svetlana Shturm
d8332bcebb Add support domain-scoped token for CLI
Change-Id: I4c0b4a6de9598e234e0b49b9cfc0b4dc5daaf7be
2019-08-02 10:15:20 -05:00
Zuul
1472a22dce Merge "Update packages related to requests" 2019-07-31 19:30:53 +00:00
Zuul
fa55f5697e Merge "Change message when no nodes found during update" 2019-07-31 16:26:29 +00:00
HUGHES, ALEXANDER (ah8742)
bfcd24f63a Update packages related to requests
Pegleg Promenade and Shipyard should all use same versions of
packages when able.  Requests currently is giving a warning
in Pegleg:
ERROR: deckhand 0.0.1.dev657 has requirement urllib3==1.24, but
you'll have urllib3 1.24.3 which is incompatible.

Change-Id: I9f21203b4109e7542a952d68c7a6ffcdb2653026
2019-07-31 15:20:35 +00:00
Andreas Jaeger
9b2c000e90 Update OpenStack api-ref location
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.

Note that redirects will be set up as well but let's point now to the
new location.

For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html

Change-Id: I09b5d45fb5ca505b1f97d0a78cc082c1e0254edd
2019-07-30 19:44:33 +02:00
Daniel Pawlik
fe03770031 Revert "charts: Remove subpath from airflow volumes"
airflow.cfg file was mounted as a dir, not a file,
so airflow service doesn't want to start.

This reverts commit 6794903558495e288f9cb6794e6459409de1fc71.

Change-Id: I6db528ac91fc5cb6719831eb2915467105f4c491
2019-07-25 12:03:45 -05:00
Roman Gorshunov
8706ad7e65 Fix: use python3 for shipyard_airflow
Change-Id: I39f87aa34d48ddb8936da82362e1ea2b05d7fde5
2019-07-25 16:35:49 +02:00
Drew Walters
6794903558 charts: Remove subpath from airflow volumes
Recently, the airflow config mounts were changed to projected volumes to
workaround a K8s bug [0]; however, a subpath prevents the configs from
being properly mounted. This change removes the subpath.

[0] https://review.opendev.org/671944

Change-Id: I9bbe91d3e27b293a6fd27c00545329bc8a36f926
Signed-off-by: Drew Walters <andrew.walters@att.com>
2019-07-22 15:17:51 +00:00
anthony.bellino
e29d826c4a [fix] Airflow Modified subpath configmap mount fails
Because of a kubernetes bug [0] when a container which
is mounted with the subpath option, the configmap is
changed and then the container restarts the mounting of
the configmap fails.

This PS uses the projected key for volume definitions
as a workaround.

[0] https://github.com/kubernetes/kubernetes/issues/68211

Change-Id: I6820a0f963c5b28e1674ea58214ffc86009db4dd
2019-07-21 21:04:39 +00:00
Ian H Pittwood
9bf298fea7 Remove setuptools from requirements
Setuptools is currently listed as a requirement for shipyard-client, but
it is not used. Pegging setuptools forces downgrading when installing
shipyard-client, which can cause issues for packages that attempt to
utilize features found in newer versions of setuptools. Removing the
setuptools requirements will allow installing users to choose their own
version of setuptools to use.

Change-Id: I88570b69346ec7019e753bdd8681fd63d55dc8c8
2019-07-16 11:59:23 -05:00
Zuul
a9ff859df9 Merge "Set default images to Ubuntu Xenial -based images" 2019-07-12 20:16:28 +00:00
Roman Gorshunov
da4426d173 Set default images to Ubuntu Xenial -based images
Since ':master' and ':latest' Shipyard and Airflow images are outdated,
set defaults to Ubuntu Xenial -based images.

Change-Id: I40978747f31c6a8c5cc8689a9768f8c4836ac1a1
2019-07-12 21:21:58 +02:00
Rajeshwari Dharwadkar
6a54c62828 Update base image from leap15.0 to leap15.1
Changes made in opensuse_15 dockerfile to support opensuse leap15.1

Change-Id: I3b010c15745b505896066fc144cbc57487dd6688
2019-07-11 17:15:06 -07:00
Zuul
aeb0c198b1 Merge "Allow user to specify token as env var" 2019-06-28 18:06:46 +00:00