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

Feature/revive compute #130

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
13 changes: 11 additions & 2 deletions scripts/setup_compute_stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ MINIKUBE_RECREATE=${MINIKUBE_RECREATE:-true}
START_MINIKUBE=${START_MINIKUBE:-true}
CONFIGURE_K8S_COMPUTE=${CONFIGURE_K8S_COMPUTE:-true}
COMPUTE_NAMESPACE=${COMPUTE_NAMESPACE:-nvm-disc}

KEEPER_ARTIFACTS_FOLDER="${HOME}/nevermined-contracts/artifacts"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is already defined in the start_nevermined.sh file:

export KEEPER_ARTIFACTS_FOLDER="${NEVERMINED_HOME}/nevermined-contracts/artifacts"

So I don't think needs to be re-defined here

MINIKUBE_HOME="/usr/local/bin"
MINIKUBE_CMD="$MINIKUBE_HOME/minikube start --kubernetes-version=v$KUBERNETES_VERSION --mount=true --mount-string=$__PARENT_DIR/accounts:/accounts --driver=docker --network=host"

Expand Down Expand Up @@ -259,11 +259,14 @@ configure_nevermined_compute() {
$K create namespace $COMPUTE_NAMESPACE
fi

#mount local directory to minikube vm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleanup

# minikube mount ${KEEPER_ARTIFACTS_FOLDER}:/tmp/hostpath-provisioner/nvm-disc/argo-artifacts &

#echo -e "${COLOR_B}Creating configmap with artifacts from folder ${KEEPER_ARTIFACTS_FOLDER} ...${COLOR_RESET}"
#$K create -n $COMPUTE_NAMESPACE configmap artifacts --from-file=${KEEPER_ARTIFACTS_FOLDER}

# Install argo artifacts
helm install -n $COMPUTE_NAMESPACE argo-artifacts stable/minio --set fullnameOverride=argo-artifacts --set resources.requests.memory=1Gi
helm install -n $COMPUTE_NAMESPACE argo-artifacts bitnami/minio --version 11.10.13 --set fullnameOverride=argo-artifacts --set resources.requests.memory=1Gi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minio version should be defined in an environment variable like MINIKUBE_VERSION and not hardcoded here

$K -n $COMPUTE_NAMESPACE get services -o wide | grep argo-artifacts
echo -e "${COLOR_G}"Notice: argo-artifacts was successfully installed"${COLOR_RESET}"

Expand All @@ -288,6 +291,12 @@ configure_nevermined_compute() {
# set secret as default for downloading docker images on the default serviceaccount
$K -n $COMPUTE_NAMESPACE patch serviceaccount default -p '{"imagePullSecrets": [{"name": "regcred"}]}'


# Update Minio deployment to use default bucket artifacts
# The json files will be loaded into the folder but are not accessible via ui
$K -n $COMPUTE_NAMESPACE set env deployment/argo-artifacts MINIO_DEFAULT_BUCKETS="artifacts:public,default:private"


$K -n $COMPUTE_NAMESPACE wait --for=condition=ready pod -l app.kubernetes.io/name=argo-workflows-server --timeout=300s
$K -n $COMPUTE_NAMESPACE port-forward deployment/argo-workflows-server 2746:2746 &

Expand Down