diff --git a/.env b/.env index 0b1e8cee..16a4f419 100755 --- a/.env +++ b/.env @@ -86,7 +86,7 @@ SHUFFLE_CONTAINER_AUTO_CLEANUP=true SHUFFLE_ORBORUS_EXECUTION_CONCURRENCY=5 SHUFFLE_HEALTHCHECK_DISABLED=false SHUFFLE_ELASTIC=true -SHUFFLE_LOGS_DISABLED=false +SHUFFLE_LOGS_DISABLED=true SHUFFLE_CHAT_DISABLED=false SHUFFLE_DISABLE_RERUN_AND_ABORT=false SHUFFLE_RERUN_SCHEDULE=300 @@ -99,7 +99,6 @@ SHUFFLE_MAX_EXECUTION_DEPTH= # DATABASE CONFIGURATIONS DATASTORE_EMULATOR_HOST=shuffle-database:8000 -#SHUFFLE_OPENSEARCH_URL=http://shuffle-opensearch:9200 SHUFFLE_OPENSEARCH_URL=https://shuffle-opensearch:9200 SHUFFLE_OPENSEARCH_CERTIFICATE_FILE= SHUFFLE_OPENSEARCH_APIKEY= diff --git a/backend/Dockerfile b/backend/Dockerfile index 16ffeff0..647f74cf 100755 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -20,7 +20,7 @@ RUN go mod tidy # From November 2022, CGO is enabled due to packages # that we use requiring it. This is a temporary fix # and makes us HAVE to install libc compatibility packages farther down. -RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o webapp . +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o shufflebackend . # Certificate build - gets required certs FROM alpine:latest as certs @@ -40,4 +40,4 @@ COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certifica WORKDIR /app EXPOSE 5001 -CMD ["./webapp"] +CMD ["./shufflebackend"] diff --git a/backend/app_gen/python-lib/baseline/Dockerfile b/backend/app_gen/python-lib/baseline/Dockerfile old mode 100755 new mode 100644 index 740fee62..d5d7e443 --- a/backend/app_gen/python-lib/baseline/Dockerfile +++ b/backend/app_gen/python-lib/baseline/Dockerfile @@ -1,26 +1,26 @@ -# Base our app image off of the WALKOFF App SDK image FROM frikky/shuffle:app_sdk as base # We're going to stage away all of the bloat from the build tools so lets create a builder stage FROM base as builder # Install all alpine build tools needed for our pip installs -RUN apk --no-cache add --update alpine-sdk libffi libffi-dev musl-dev openssl-dev +RUN apk --no-cache add --update alpine-sdk libffi libffi-dev musl-dev openssl-dev git # Install all of our pip packages in a single directory that we can copy to our base image later RUN mkdir /install WORKDIR /install COPY requirements.txt /requirements.txt -RUN pip install --prefix="/install" -r /requirements.txt +RUN pip install --no-cache-dir --upgrade --prefix="/install" -r /requirements.txt # Switch back to our base image and copy in all of our built packages and source code FROM base COPY --from=builder /install /usr/local COPY src /app -# Install any binary dependencies needed in our final image - this can be a lot of different stuff -RUN apk --no-cache add --update libmagic +# Install any binary dependencies needed in our final image +# RUN apk --no-cache add --update my_binary_dependency +RUN apk --no-cache add jq git curl # Finally, lets run our app! WORKDIR /app -CMD python app.py --log-level DEBUG +CMD ["python", "app.py", "--log-level", "DEBUG"] \ No newline at end of file diff --git a/backend/go-app/go.mod b/backend/go-app/go.mod index f6d34f38..966ebb91 100644 --- a/backend/go-app/go.mod +++ b/backend/go-app/go.mod @@ -24,7 +24,7 @@ require ( github.com/gorilla/mux v1.8.1 github.com/h2non/filetype v1.1.3 github.com/satori/go.uuid v1.2.0 - github.com/shuffle/shuffle-shared v0.9.16 + github.com/shuffle/shuffle-shared v0.9.17 github.com/shuffle/singul v0.0.16 golang.org/x/crypto v0.40.0 google.golang.org/api v0.236.0 diff --git a/backend/go-app/main.go b/backend/go-app/main.go index 79622f95..38752409 100755 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -3333,10 +3333,15 @@ func buildSwaggerApp(resp http.ResponseWriter, body []byte, user shuffle.User, s // Read and copy the baseline Dockerfile dockerfileContent, err := ioutil.ReadFile(dockerfileSource) if err != nil { - log.Printf("[ERROR] Failed to read baseline Dockerfile: %s", err) - resp.WriteHeader(500) - resp.Write([]byte(`{"success": false, "reason": "Failed to read baseline Dockerfile"}`)) - return + foundDockerfile := shuffle.GetBaseDockerfile() + if len(foundDockerfile) > 0 { + dockerfileContent = foundDockerfile + } else { + log.Printf("[ERROR] Failed to read baseline Dockerfile: %s", err) + resp.WriteHeader(500) + resp.Write([]byte(`{"success": false, "reason": "Failed to read baseline Dockerfile"}`)) + return + } } err = ioutil.WriteFile(dockerfileDestination, dockerfileContent, 0644) diff --git a/docker-compose.yml b/docker-compose.yml index cfd67680..ce3de3f6 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -55,6 +55,7 @@ services: - SHUFFLE_STATS_DISABLED=true - SHUFFLE_LOGS_DISABLED=true - SHUFFLE_SWARM_CONFIG=run + - CLEANUP=false - SHUFFLE_WORKER_IMAGE=ghcr.io/shuffle/shuffle-worker:latest env_file: .env restart: unless-stopped diff --git a/functions/onprem/worker/worker.go b/functions/onprem/worker/worker.go index c6b82823..2ecffa73 100644 --- a/functions/onprem/worker/worker.go +++ b/functions/onprem/worker/worker.go @@ -1302,8 +1302,7 @@ func getWorkerURLs() ([]string, error) { // } // } // } - - log.Printf("[DEBUG] Worker URLs for k8s: %#v", workerUrls) + //log.Printf("[DEBUG] Worker URLs for k8s: %#v", workerUrls) return workerUrls, nil } @@ -3615,7 +3614,10 @@ func findAppInfoKubernetes(image, name string, env []string) error { for _, deployment := range deployments.Items { if deployment.Name == name { - log.Printf("[INFO] Found deployment %s - no need to deploy another", name) + if debug { + log.Printf("[DEBUG] Found deployment %s - no need to deploy another", name) + } + return nil } }