Skip to content

Commit

Permalink
refactor: flux provisioned from sidecar container
Browse files Browse the repository at this point in the history
Problem: we require flux to be packaged alongside the application logic.
Solution: provide via a sidecar container with an isolated spack build.'

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Oct 10, 2023
1 parent 76c4754 commit ebaa5bd
Show file tree
Hide file tree
Showing 184 changed files with 3,791 additions and 2,460 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,22 @@ jobs:
strategy:
fail-fast: false
matrix:
test: [["hello-world", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["custom-config", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["minimal-service", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["post", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["batch", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["singularity", "ghcr.io/rse-ops/singularity:tag-mamba", 60],
["nginx-sidecar-service", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["nginx-service", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["lammps", "ghcr.io/rse-ops/lammps:flux-sched-focal-v0.24.0", 60],
["pokemon", "ghcr.io/rse-ops/pokemon:app-latest", 60],
["timed", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["debug", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["flux-resource-list", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["existing-volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["snakemake", "ghcr.io/rse-ops/atacseq:app-latest", 60]]
test: [["hello-world", "ghcr.io/flux-framework/flux-restful-api:latest", 60]]
#["custom-config", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["minimal-service", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["post", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["batch", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["singularity", "ghcr.io/rse-ops/singularity:tag-mamba", 60],
#["nginx-sidecar-service", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["nginx-service", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["lammps", "ghcr.io/rse-ops/lammps:flux-sched-focal-v0.24.0", 60],
#["pokemon", "ghcr.io/rse-ops/pokemon:app-latest", 60],
#["timed", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["debug", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["flux-resource-list", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["existing-volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["snakemake", "ghcr.io/rse-ops/atacseq:app-latest", 60]]

steps:
- name: Clone the code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate fo
cd sdk/python/v1alpha1/
cd sdk/python/v1alpha2/
pip install -e .
python setup.py sdist bdist_wheel
cd dist
Expand Down
83 changes: 0 additions & 83 deletions .github/workflows/test-python.yaml

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
The versions coincide with releases on pip. Only major versions will be released as tags on Github.

## [0.0.x](https://github.com/flux-framework/flux-operator/tree/main) (0.0.x)
- refactor design to allow for any base image, v1alpha2 release (0.2.0)
- fluxoperator-gen command added and restructure for more modular generation (0.1.1)
- First release supporting experimenting bursting / scaling and customization (0.1.0)
- Support for automated testing of examples/tests (0.0.x)
Expand Down
17 changes: 11 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 0.1.1
API_VERSION ?= v1alpha1
API_VERSION ?= v1alpha2

# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
Expand Down Expand Up @@ -222,20 +222,20 @@ images:

.PHONY: build
build: generate fmt vet ## Build manager binary.
mv ./controllers/flux/keygen.go ./controllers/flux/keygen.go.backup
cp ./controllers/flux/keygen.go.template ./controllers/flux/keygen.go
mv ./pkg/flux/keygen.go ./pkg/flux/keygen.go.backup
cp ./pkg/flux/keygen.go.template ./pkg/flux/keygen.go
$(BUILDENVVAR) go build -o bin/manager main.go
mv ./controllers/flux/keygen.go.backup ./controllers/flux/keygen.go
mv ./pkg/flux/keygen.go.backup ./pkg/flux/keygen.go

.PHONY: build-container
build-container: generate fmt vet
cp ./controllers/flux/keygen.go.template ./controllers/flux/keygen.go
cp ./pkg/flux/keygen.go.template ./pkg/flux/keygen.go
$(BUILDENVVAR) go build -a -o ./manager main.go
$(BUILDENVVAR) go build -o ./bin/fluxoperator-gen cmd/gen/gen.go

.PHONY: helpers
helpers: $(LOCALBIN)
cp ./controllers/flux/keygen.go.template ./controllers/flux/keygen.go
cp ./pkg/flux/keygen.go.template ./pkg/flux/keygen.go
$(BUILDENVVAR) go build -o ./bin/fluxoperator-gen cmd/gen/gen.go

.PHONY: run
Expand Down Expand Up @@ -291,6 +291,11 @@ test-deploy: manifests kustomize
cd config/manager && $(KUSTOMIZE) edit set image controller=${DEVIMG}
$(KUSTOMIZE) build config/default > examples/dist/flux-operator-dev.yaml

.PHONY: test-deploy-recreate
test-deploy-recreate: test-deploy
kubectl delete -f ./examples/dist/flux-operator-dev.yaml || echo "Already deleted"
kubectl apply -f ./examples/dist/flux-operator-dev.yaml

.PHONY: arm-deploy
arm-deploy: manifests kustomize
docker buildx build --platform linux/arm64 --push -t ${ARMIMG} .
Expand Down
14 changes: 3 additions & 11 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@ resources:
namespaced: true
controller: true
domain: flux-framework.org
kind: Flux
path: flux-framework/flux-operator/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: flux-framework.org
kind: FluxSetup
path: flux-framework/flux-operator/api/v1alpha1
version: v1alpha1
kind: MiniCluster
path: flux-framework/flux-operator/api/v1alpha2
version: v1alpha2
version: "3"
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ And the following external resources might be useful:
**Note** this project is actively under development, and you can expect change and improvements!
We apologize for bugs you run into, and hope you tell us soon so we can work on resolving them.

## TODO

- add [jar](wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.6.0/openapi-generator-cli-6.6.0.jar -O openapi-generator-cli.jar) to makefile

## License

HPCIC DevTools is distributed under the terms of the MIT license.
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/doc.go → api/v1alpha2/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

// Package v1alpha1 is the v1alpha1 version of the API.
// +groupName=flux-framework.org
package v1alpha1
package v1alpha2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SPDX-License-Identifier: Apache-2.0
// Package v1alpha1 contains API Schema definitions for the v1alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=flux-framework.org
package v1alpha1
package v1alpha2

import (
"k8s.io/apimachinery/pkg/runtime/schema"
Expand All @@ -20,7 +20,7 @@ import (

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "flux-framework.org", Version: "v1alpha1"}
GroupVersion = schema.GroupVersion{Group: "flux-framework.org", Version: "v1alpha2"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
Loading

0 comments on commit ebaa5bd

Please sign in to comment.