Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merging 5946/5962-5975 to prod #5975

Merged
merged 41 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
02a5a6e
user pool node resize - Deployment Manager check
gmerritt Aug 12, 2024
45bd4de
Oops -- not all fields are in-place updatable. Trying w/ min nodes in…
gmerritt Aug 12, 2024
125999d
Settings updated, but pool nodes unchanged. Trying both initial++ & m…
gmerritt Aug 12, 2024
68bc0e0
Back to defaults. ("initial" was obeyed, but "min++" seems to not cau…
gmerritt Aug 12, 2024
33ef944
Deployment update behavior notes added to ugr vendor gke README.md
gmerritt Aug 12, 2024
4d45689
README.md typo fixed
gmerritt Aug 12, 2024
bb8532d
preparing for more hubploy testing
shaneknapp Aug 13, 2024
5baf2e5
adding hubploy testing
shaneknapp Aug 15, 2024
2339589
placeholder commit
shaneknapp Aug 16, 2024
e361daf
add github workflow for linting yaml
shaneknapp Aug 16, 2024
2dc5471
minor tweaks
shaneknapp Aug 16, 2024
b8b87df
Merge pull request #5962 from shaneknapp/add-yaml-linting
shaneknapp Aug 16, 2024
9879146
testing yamllint
shaneknapp Aug 16, 2024
1981cd3
fixing event name
shaneknapp Aug 16, 2024
217263f
fixing chartpress.yaml
shaneknapp Aug 16, 2024
48a01c5
Merge pull request #5963 from shaneknapp/test-yaml-lint
shaneknapp Aug 16, 2024
7dac2d2
Merge pull request #5946 from gmerritt/ugr_resize
shaneknapp Aug 16, 2024
b84d370
initial commit to test gcloud github actions
shaneknapp Aug 19, 2024
c810346
why is there a conflict
shaneknapp Aug 19, 2024
1421ec5
Merge pull request #5964 from shaneknapp/prepare-logodev-for-hubploy-…
shaneknapp Aug 19, 2024
763f4ef
whoopsie
shaneknapp Aug 19, 2024
0ed3db6
Merge pull request #5965 from shaneknapp/fix-secret-name
shaneknapp Aug 19, 2024
7e9f239
testing hubploy
shaneknapp Aug 19, 2024
55aabc0
Merge pull request #5966 from shaneknapp/add-hub-parsing-to-deploy
shaneknapp Aug 19, 2024
ea0b0b2
Update deploy-to-staging.yaml
shaneknapp Aug 19, 2024
35f824a
Merge pull request #5967 from berkeley-dsep-infra/shaneknapp-patch-1
shaneknapp Aug 19, 2024
df686db
hopefully the final test
shaneknapp Aug 19, 2024
7efb398
Merge pull request #5968 from shaneknapp/testing-logodev-again
shaneknapp Aug 19, 2024
2ff3b37
set env var for sops to use for auth
shaneknapp Aug 19, 2024
14ac6e2
update variable name to match secret in github repo
shaneknapp Aug 19, 2024
f595927
trigger a deployment to staging
shaneknapp Aug 19, 2024
8b1addc
remove repo from paths etc
shaneknapp Aug 19, 2024
c68d215
Merge pull request #5969 from shaneknapp/fix-sops-creds
shaneknapp Aug 19, 2024
9b93f96
whee this is FUN
shaneknapp Aug 19, 2024
126b8fd
Merge pull request #5970 from shaneknapp/more-sops-madness
shaneknapp Aug 19, 2024
832eab6
fix broken url for sops
shaneknapp Aug 19, 2024
d238071
Merge pull request #5972 from shaneknapp/fix-sops-download
shaneknapp Aug 19, 2024
789432b
add gke auth plugin
shaneknapp Aug 19, 2024
3c70648
Merge pull request #5973 from shaneknapp/add-gke-auth-plugin
shaneknapp Aug 19, 2024
4c3701d
turn this off for now
shaneknapp Aug 19, 2024
501cf15
Merge pull request #5974 from shaneknapp/temp-disable-staging-deploy
shaneknapp Aug 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions .github/workflows/deploy-to-staging.yaml.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Deploy images to staging hubs
# use echo ${VAR##*: } to get the value of a variable that is a string with a colon in it
on:
workflow_dispatch:
push:
branches:
- staging

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Get PR labels
id: pr-labels
uses: irby/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Check out the image repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.

- name: Pull out any hubs that need deploying from the labels on the merge commit to staging
run: |
echo "PR labels: ${{ steps.pr-labels.outputs.labels }}"
HUBS=()
for label in $(echo -e "${{ steps.pr-labels.outputs.labels }}"); do
if [[ "$label" == hub-* ]]; then
label=$(echo $label | awk -F'-' '{print $2}')
HUBS+="$label"
echo "DEPLOY=1" >> $GITHUB_ENV
fi
done
echo "Hubs to deploy: $HUBS"
echo "DEPLOY_HUBS=${HUBS[@]}" >> $GITHUB_ENV

- name: Setup python
if: ${{ env.DEPLOY }}
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
if: ${{ env.DEPLOY }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install --force-reinstall git+https://github.com/shaneknapp/hubploy.git@major-refactor

- name: Auth to gcloud
if: ${{ env.DEPLOY }}
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GKE_KEY }}
project_id: ${{ secrets.GCP_PROJECT_ID }}

- name: Install Google Cloud SDK
if: ${{ env.DEPLOY }}
uses: google-github-actions/setup-gcloud@v2
with:
install_components: 'gke-gcloud-auth-plugin'

- name: Install SOPS
if: ${{ env.DEPLOY }}
run: |
mkdir -p ${HOME}/bin
curl -sSL https://github.com/getsops/sops/releases/download/v3.9.0/sops-v3.9.0.linux.amd64 -o ${HOME}/bin/sops
chmod 755 ${HOME}/bin/sops
echo "${HOME}/bin" >> $GITHUB_PATH

- name: Store SOPS secret in a file
if: ${{ env.DEPLOY }}
run: |
cat << EOF > ${HOME}/sops.key
${{ secrets.SOPS_KEY }}
EOF
echo "GOOGLE_APPLICATION_CREDENTIALS=${HOME}/sops.key" >> $GITHUB_ENV

- name: Install Helm
if: ${{ env.DEPLOY }}
run: |
curl -L https://get.helm.sh/helm-v3.13.3-linux-amd64.tar.gz | tar -xzf -
mv linux-amd64/helm /usr/local/bin
helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm repo update

- name: Deploy hubs to staging
if: ${{ env.DEPLOY }}
run: |
for hub in $(echo -e "${{ env.DEPLOY_HUBS }}"); do
echo "Deploying $hub to staging"
hubploy --verbose deploy $hub hub staging
done
15 changes: 15 additions & 0 deletions .github/workflows/yaml-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Yaml lint"
on:
- pull_request # yamllint disable-line rule:truthy

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install yamllint
run: pip install yamllint==1.35.1

- name: Lint YAML files
run: yamllint --no-warnings .
10 changes: 1 addition & 9 deletions deployments/logodev/hubploy.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
images:
images:
# temporary update
- name: us-central1-docker.pkg.dev/ucb-datahub-2018/user-images/logodev-user-image:a02e39fbaedb
path: image/
repo2docker:
base_image: docker.io/library/buildpack-deps:jammy
registry:
provider: gcloud
gcloud:
project: ucb-datahub-2018
service_key: gcr-key.json
- name: us-central1-docker.pkg.dev/ucb-datahub-2018/user-images/logodev-user-image:a9443779a3a9

cluster:
provider: gcloud
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ chardet
requests==2.31.0
# requests==2.32.3
urllib3<2.0.0
yamllint==1.35.1
4 changes: 3 additions & 1 deletion vendor/google/ugr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,6 @@ Run the shell script to deploy:

## Change a deployment

To change an existing deployment, edit the parameters to be changed in the deployment's yaml config and run its associated shell script.
To change an existing deployment, edit the parameters to be changed in the deployment's yaml config and run its associated shell script.

Note that not all parameters can be updated in place. For example, node pool autoscaling (such as min/max numbers and on/off) can be updated on the "hot" deployment, but other config settings (e.g., machine type and disk size) require the resources to first be undeployed, then deployed anew with the new configuration.
Loading