Skip to content

Commit

Permalink
Update blobs (#100)
Browse files Browse the repository at this point in the history
* add curator_opensearch-0.0.13.tar.gz blob

* update blob reference in package

* delete old curator blob

* add script to download wheels for Python packages

* update script for add python wheel blobs

* rename script

* reformat script

* update notes in packaging script

* update auth-proxy blobs

* add notes to curator packaging script

* update curator_opensearch vendor blobs

* add uploaded blob metadata

* update curator blobs in packaging spec

* update files reference in curator packaging spec

* remove unnecessary blob

* update auth-proxy blobs

* add updated blob metadata

* remove commented code

* remove commented lines
  • Loading branch information
markdboyd authored Nov 6, 2024
1 parent c5356cc commit d6f1860
Show file tree
Hide file tree
Showing 7 changed files with 236 additions and 239 deletions.
13 changes: 0 additions & 13 deletions bin/add-auth-proxy-blobs.sh

This file was deleted.

19 changes: 19 additions & 0 deletions bin/add-wheel-blobs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

WHEEL_SRC_DIR=$1
BLOB_PREFIX=$2

if [ -z "$WHEEL_SRC_DIR" ]; then
echo "path to opensearch-dashboards-cf-auth-proxy source code required as first argument. exiting"
exit 1
fi

if [ -z "$BLOB_PREFIX" ]; then
echo "blob prefix required as second argument. exiting"
exit 1
fi

find "$WHEEL_SRC_DIR" \
-type f \
-name "*.whl" \
-exec bash -c 'path="$1"; blob_prefix="$2"; file_name=$(basename $1); bosh add-blob $path "$blob_prefix/$file_name"' shell {} "$BLOB_PREFIX" \;
16 changes: 16 additions & 0 deletions bin/download-wheels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

export PYTHON_VERSION="3.12"
PACKAGE_NAME=$1

if [ -z "$PACKAGE_NAME" ]; then
echo "package name to download wheels for required as first argument. exiting"
exit 1
fi

pip download "$PACKAGE_NAME" \
--platform manylinux_2_17_x86_64 \
--platform linux_x86_64 \
--only-binary=:all: \
--python-version "$PYTHON_VERSION" \
--dest "vendor/$PACKAGE_NAME"
372 changes: 180 additions & 192 deletions config/blobs.yml

Large diffs are not rendered by default.

21 changes: 15 additions & 6 deletions packages/curator/packaging
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
#!/usr/bin/env bash

set -e

export PATH="/var/vcap/packages/python3/bin:${PATH}" LD_LIBRARY_PATH="/var/vcap/packages/python3/lib:${LD_LIBRARY_PATH}" C_INCLUDE_PATH="/var/vcap/packages/python3/include:${C_INCLUDE_PATH}"
export PATH="/var/vcap/packages/python3/bin:${PATH}"
export LD_LIBRARY_PATH="/var/vcap/packages/python3/lib:${LD_LIBRARY_PATH}"
export C_INCLUDE_PATH="/var/vcap/packages/python3/include:${C_INCLUDE_PATH}"

# To download updated blobs for this package, see bin/download-wheels.sh. For example:
#
# ./bin/download-wheels/curator_opensearch
#
# Then, add the downloaded blobs to the release:
#
# ./bin/add-wheel-blobs.sh vendor/curator_opensearch curator_opensearch/vendor

# --no-index prevents contacting pypi to download packages
# --find-links tells pip where to look for the dependancies
# --prefix installation prefix where lib, bin and other top-level folders are placed
pip3 install --no-index "--prefix=${BOSH_INSTALL_TARGET}" curator/vendor/flit_core-3.8.0.tar.gz
pip3 install --no-index --find-links ./curator/vendor/ "--prefix=${BOSH_INSTALL_TARGET}" curator/vendor/wheel-0.41.2.tar.gz
pip3 install --no-index --find-links ./curator/vendor/ "--prefix=${BOSH_INSTALL_TARGET}" curator/vendor/Cython-0.29.36.tar.gz
pip3 install --no-index --find-links ./curator/vendor/ "--prefix=${BOSH_INSTALL_TARGET}" curator/vendor/PyYAML-6.0.1.tar.gz
pip3 install --no-index --find-links ./curator/vendor/ "--prefix=${BOSH_INSTALL_TARGET}" curator_opensearch-0.0.12-py2.py3-none-any.whl

python3 -m pip install "--prefix=${BOSH_INSTALL_TARGET}" --no-index curator_opensearch/vendor/*.whl
tar xzvf curator_opensearch-0.0.13.tar.gz -C "$BOSH_INSTALL_TARGET" --strip-components 1
30 changes: 3 additions & 27 deletions packages/curator/spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,8 @@
name: curator

dependencies:
- python3
- python3

files:
- curator_opensearch-0.0.12-py2.py3-none-any.whl
- curator/vendor/charset_normalizer-3.2.0-py3-none-any.whl
- curator/vendor/PyYAML-6.0.1.tar.gz
- curator/vendor/boto3-1.28.40-py3-none-any.whl
- curator/vendor/botocore-1.31.40-py3-none-any.whl
- curator/vendor/click-7.1.2-py2.py3-none-any.whl
- curator/vendor/docutils-0.20.1-py3-none-any.whl
- curator/vendor/jmespath-1.0.1-py3-none-any.whl
- curator/vendor/opensearch_py-2.7.1-py3-none-any.whl
- curator/vendor/python_dateutil-2.8.2-py2.py3-none-any.whl
- curator/vendor/requests_aws4auth-1.2.3-py2.py3-none-any.whl
- curator/vendor/s3transfer-0.6.2-py3-none-any.whl
- curator/vendor/six-1.16.0-py2.py3-none-any.whl
- curator/vendor/voluptuous-0.13.1-py3-none-any.whl
# CLOUD.GOV: DO NOT REMOVE THE ELEMENTS BELOW THIS COMMENT!!!
# These files are necessary because we vendor python. The upstream
# release includes these in the python package.
- curator/vendor/certifi-2023.7.22-py3-none-any.whl
- curator/vendor/chardet-5.2.0-py3-none-any.whl
- curator/vendor/idna-3.4-py3-none-any.whl
- curator/vendor/requests-2.31.0-py3-none-any.whl
- curator/vendor/urllib3-1.26.5-py2.py3-none-any.whl
- curator/vendor/flit_core-3.8.0.tar.gz
- curator/vendor/wheel-0.41.2.tar.gz
- curator/vendor/setuptools-69.0.3.tar.gz
- curator/vendor/Cython-0.29.36.tar.gz
- curator_opensearch-0.0.13.tar.gz
- curator_opensearch/vendor/*
4 changes: 3 additions & 1 deletion packages/opensearch-dashboards-cf-auth-proxy/spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
#
# To update this run:
# - Run bin/download-wheels.sh from https://github.com/cloud-gov/opensearch-dashboards-cf-auth-proxy to download wheels
# - Run bin/add-auth-proxy-blobs.sh from this repo
# - Run bin/add-wheel-blobs.sh from this repo like so:
#
# ./bin/add-wheel-blobs.sh /path/to/proxy/repo auth-proxy
#
# Use the version of Python specified in the python3 package. See https://github.com/cloud-gov/cg-python3-boshrelease
name: opensearch_dashboards_cf_auth_proxy
Expand Down

0 comments on commit d6f1860

Please sign in to comment.