Skip to content

Commit

Permalink
:Merge branch 'master' of https://github.com/lsst-uk/phalanx-test
Browse files Browse the repository at this point in the history
  • Loading branch information
stvoutsin committed Aug 8, 2023
2 parents 2c5aea3 + 4e7c794 commit d4021cb
Show file tree
Hide file tree
Showing 390 changed files with 10,482 additions and 821 deletions.
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

35 changes: 28 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ jobs:
- name: Run pre-commit
uses: pre-commit/[email protected]

test:
runs-on: ubuntu-latest
timeout-minutes: 10

strategy:
matrix:
python:
- "3.11"

steps:
- uses: actions/checkout@v3

- uses: lsst-sqre/run-tox@v1
with:
python-version: ${{ matrix.python }}
tox-envs: "typing,py,coverage-report"
cache-key-prefix: test

helm:
runs-on: ubuntu-latest

Expand All @@ -42,7 +60,7 @@ jobs:
python-version: "3.11"

- name: Install test dependencies
run: pip install .
run: make init

- name: Expand modified charts
run: expand-charts
Expand All @@ -61,6 +79,7 @@ jobs:
minikube:
name: Test deploy
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [helm]

steps:
Expand All @@ -85,10 +104,11 @@ jobs:
- name: Setup Minikube
if: steps.filter.outputs.minikube == 'true'
uses: manusa/actions-setup-minikube@v2.7.2
uses: medyagh/setup-minikube@v0.0.14
with:
minikube version: 'v1.28.0'
kubernetes version: 'v1.25.2'
kubernetes-version: "v1.27.3"
cpus: max
memory: 5500m # Linux virtual machines have 7GB of RAM

- name: Test interaction with the cluster
if: steps.filter.outputs.minikube == 'true'
Expand All @@ -97,17 +117,17 @@ jobs:
- name: Download installer dependencies
if: steps.filter.outputs.minikube == 'true'
run: |
curl -sSL -o /tmp/vault.zip https://releases.hashicorp.com/vault/1.12.1/vault_1.12.1_linux_amd64.zip
curl -sSL -o /tmp/vault.zip https://releases.hashicorp.com/vault/1.14.0/vault_1.14.0_linux_amd64.zip
unzip /tmp/vault.zip
sudo mv vault /usr/local/bin/vault
sudo chmod +x /usr/local/bin/vault
sudo curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/download/v2.6.7/argocd-linux-amd64
sudo curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/download/v2.7.8/argocd-linux-amd64
sudo chmod +x /usr/local/bin/argocd
sudo apt-get install socat
sudo pip install -r installer/requirements.txt
- name: Run installer
timeout-minutes: 30
timeout-minutes: 15
if: steps.filter.outputs.minikube == 'true'
run: |
cd installer
Expand All @@ -120,6 +140,7 @@ jobs:
kubectl get ingress -A
- name: Wait for all applications to be healthy
timeout-minutes: 15
if: steps.filter.outputs.minikube == 'true'
run: |
argocd app wait -l "argocd.argoproj.io/instance=science-platform" \
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Dependency Update

"on":
workflow_dispatch: {}

jobs:
update:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3

- name: Run neophile
uses: lsst-sqre/run-neophile@v1
with:
python-version: "3.11"
mode: pr
types: pre-commit
app-id: ${{ secrets.NEOPHILE_APP_ID }}
app-secret: ${{ secrets.NEOPHILE_PRIVATE_KEY }}

- name: Report status
if: always()
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: "failure"
notification_title: "Periodic dependency update for {repo} failed"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ALERT_WEBHOOK }}
2 changes: 1 addition & 1 deletion .github/workflows/linkcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ name: Link Check
workflow_dispatch: {}

jobs:
docs:
linkcheck:
runs-on: ubuntu-latest

steps:
Expand Down
47 changes: 26 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,49 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-merge-conflict
- id: check-toml
- id: trailing-whitespace

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.30.0
- repo: https://github.com/adrienverge/yamllint
rev: v1.32.0
hooks:
- id: yamllint
args:
- "-c=.yamllint.yml"
- -c=.yamllint.yml

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.3
hooks:
- id: check-jsonschema
files: "^applications/.*/secrets(-[^./-]+)?\\.yaml"
args: ["--schemafile", "docs/extras/schemas/secrets.json"]
- id: check-metaschema
files: "^docs/extras/schemas/.*\\.json"

- repo: https://github.com/norwoodj/helm-docs
rev: v1.11.0
rev: v1.11.1
hooks:
- id: helm-docs
args:
- "--chart-search-root=."
- --chart-search-root=.
# The `./` makes it relative to the chart-search-root set above
- "--template-files=./helm-docs.md.gotmpl"
- --template-files=./helm-docs.md.gotmpl
- --document-dependency-values=true

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.280
hooks:
- id: isort
additional_dependencies:
- toml
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.7.0
hooks:
- id: black

- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.15.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.1.0]

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: [black==23.7.0]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2022 Association of Universities for Research in Astronomy, Inc. (AURA)
Copyright (c) 2019-2023 Association of Universities for Research in Astronomy, Inc. (AURA)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
33 changes: 25 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
.PHONY:
.PHONY: help
help:
@echo "Make targets for Phalanx:"
@echo "make clean - Remove generated files"
@echo "make init - Set up dev environment (install pre-commit hooks)"
@echo "make update - Update pinned dependencies and run make init"
@echo "make update-deps - Update pinned dependencies"

.PHONY:
.PHONY: clean
clean:
rm -rf .mypy_cache .ruff_cache .tox docs/_build
make -C docs clean

.PHONY: init
init:
pip install --editable .
pip install --upgrade -r requirements/main.txt -r requirements/dev.txt
rm -rf .tox
pip install --upgrade pre-commit tox
pre-commit install
pip install -e ".[dev]"
rm -rf .tox

.PHONY:
clean:
rm -rf .tox
make -C docs clean
.PHONY: update
update: update-deps init

.PHONY: update-deps
update-deps:
pip install --upgrade pip-tools pip setuptools
pip-compile --upgrade --resolver=backtracking --build-isolation \
--generate-hashes --allow-unsafe \
--output-file requirements/main.txt requirements/main.in
pip-compile --upgrade --resolver=backtracking --build-isolation \
--generate-hashes --allow-unsafe \
--output-file requirements/dev.txt requirements/dev.in
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Phalanx

This is the Argo CD repository for the Rubin Science Platform.
It stores the root Argo CD application, deployment configuration for the other applications, the installer, and other helper scripts.

See [phalanx.lsst.io](https://phalanx.lsst.io/) for full documentation.

Phalanx is developed by the [Vera C. Rubin Observatory](https://www.lsst.org/).

A phalanx is a SQuaRE deployment (Science Quality and Reliability Engineering, the team responsible for the Rubin Science Platform).
Phalanx is how we ensure that all of our services work together as a unit.
23 changes: 0 additions & 23 deletions README.rst

This file was deleted.

Loading

0 comments on commit d4021cb

Please sign in to comment.