diff --git a/elements/contrail-repo/README.md b/elements/contrail-repo/README.md new file mode 100644 index 000000000..e4a0ff3d3 --- /dev/null +++ b/elements/contrail-repo/README.md @@ -0,0 +1,6 @@ +Enables the Contrail repository. + +This element requires the $CONTRAIL_URL variable set to specify a path to a +contrail-install-packages package to be installed. + +This elements currently only works on a RHEL based system. diff --git a/elements/contrail-repo/element-deps b/elements/contrail-repo/element-deps new file mode 100644 index 000000000..77ce2602d --- /dev/null +++ b/elements/contrail-repo/element-deps @@ -0,0 +1,2 @@ +pip-manifest +rdo-release diff --git a/elements/contrail-repo/post-install.d/10-contrail-setup b/elements/contrail-repo/post-install.d/10-contrail-setup new file mode 100755 index 000000000..0cb3b56ed --- /dev/null +++ b/elements/contrail-repo/post-install.d/10-contrail-setup @@ -0,0 +1,5 @@ +#!/bin/bash + +set -eux + +/opt/contrail/contrail_packages/setup.sh diff --git a/elements/contrail-repo/pre-install.d/10-contrail-repo b/elements/contrail-repo/pre-install.d/10-contrail-repo new file mode 100755 index 000000000..8fdf3c3f1 --- /dev/null +++ b/elements/contrail-repo/pre-install.d/10-contrail-repo @@ -0,0 +1,12 @@ +#!/bin/bash + +set -eux + +export CONTRAIL_URL=${CONTRAIL_URL:-""} + +if [ -z "$CONTRAIL_URL" ]; then + echo "One should specify an HTTP URL to the contrail-install-packages for this element to work" + exit 1 +fi + +yum -y install $CONTRAIL_URL