Fixed the issue with app builds onprem not working
This commit is contained in:
@@ -86,7 +86,7 @@ SHUFFLE_CONTAINER_AUTO_CLEANUP=true
|
|||||||
SHUFFLE_ORBORUS_EXECUTION_CONCURRENCY=5
|
SHUFFLE_ORBORUS_EXECUTION_CONCURRENCY=5
|
||||||
SHUFFLE_HEALTHCHECK_DISABLED=false
|
SHUFFLE_HEALTHCHECK_DISABLED=false
|
||||||
SHUFFLE_ELASTIC=true
|
SHUFFLE_ELASTIC=true
|
||||||
SHUFFLE_LOGS_DISABLED=false
|
SHUFFLE_LOGS_DISABLED=true
|
||||||
SHUFFLE_CHAT_DISABLED=false
|
SHUFFLE_CHAT_DISABLED=false
|
||||||
SHUFFLE_DISABLE_RERUN_AND_ABORT=false
|
SHUFFLE_DISABLE_RERUN_AND_ABORT=false
|
||||||
SHUFFLE_RERUN_SCHEDULE=300
|
SHUFFLE_RERUN_SCHEDULE=300
|
||||||
@@ -99,7 +99,6 @@ SHUFFLE_MAX_EXECUTION_DEPTH=
|
|||||||
|
|
||||||
# DATABASE CONFIGURATIONS
|
# DATABASE CONFIGURATIONS
|
||||||
DATASTORE_EMULATOR_HOST=shuffle-database:8000
|
DATASTORE_EMULATOR_HOST=shuffle-database:8000
|
||||||
#SHUFFLE_OPENSEARCH_URL=http://shuffle-opensearch:9200
|
|
||||||
SHUFFLE_OPENSEARCH_URL=https://shuffle-opensearch:9200
|
SHUFFLE_OPENSEARCH_URL=https://shuffle-opensearch:9200
|
||||||
SHUFFLE_OPENSEARCH_CERTIFICATE_FILE=
|
SHUFFLE_OPENSEARCH_CERTIFICATE_FILE=
|
||||||
SHUFFLE_OPENSEARCH_APIKEY=
|
SHUFFLE_OPENSEARCH_APIKEY=
|
||||||
|
|||||||
+2
-2
@@ -20,7 +20,7 @@ RUN go mod tidy
|
|||||||
# From November 2022, CGO is enabled due to packages
|
# From November 2022, CGO is enabled due to packages
|
||||||
# that we use requiring it. This is a temporary fix
|
# that we use requiring it. This is a temporary fix
|
||||||
# and makes us HAVE to install libc compatibility packages farther down.
|
# 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
|
# Certificate build - gets required certs
|
||||||
FROM alpine:latest as 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
|
WORKDIR /app
|
||||||
EXPOSE 5001
|
EXPOSE 5001
|
||||||
CMD ["./webapp"]
|
CMD ["./shufflebackend"]
|
||||||
|
|||||||
Executable → Regular
+6
-6
@@ -1,26 +1,26 @@
|
|||||||
# Base our app image off of the WALKOFF App SDK image
|
|
||||||
FROM frikky/shuffle:app_sdk as base
|
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
|
# We're going to stage away all of the bloat from the build tools so lets create a builder stage
|
||||||
FROM base as builder
|
FROM base as builder
|
||||||
|
|
||||||
# Install all alpine build tools needed for our pip installs
|
# 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
|
# Install all of our pip packages in a single directory that we can copy to our base image later
|
||||||
RUN mkdir /install
|
RUN mkdir /install
|
||||||
WORKDIR /install
|
WORKDIR /install
|
||||||
COPY requirements.txt /requirements.txt
|
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
|
# Switch back to our base image and copy in all of our built packages and source code
|
||||||
FROM base
|
FROM base
|
||||||
COPY --from=builder /install /usr/local
|
COPY --from=builder /install /usr/local
|
||||||
COPY src /app
|
COPY src /app
|
||||||
|
|
||||||
# Install any binary dependencies needed in our final image - this can be a lot of different stuff
|
# Install any binary dependencies needed in our final image
|
||||||
RUN apk --no-cache add --update libmagic
|
# RUN apk --no-cache add --update my_binary_dependency
|
||||||
|
RUN apk --no-cache add jq git curl
|
||||||
|
|
||||||
# Finally, lets run our app!
|
# Finally, lets run our app!
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
CMD python app.py --log-level DEBUG
|
CMD ["python", "app.py", "--log-level", "DEBUG"]
|
||||||
@@ -24,7 +24,7 @@ require (
|
|||||||
github.com/gorilla/mux v1.8.1
|
github.com/gorilla/mux v1.8.1
|
||||||
github.com/h2non/filetype v1.1.3
|
github.com/h2non/filetype v1.1.3
|
||||||
github.com/satori/go.uuid v1.2.0
|
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
|
github.com/shuffle/singul v0.0.16
|
||||||
golang.org/x/crypto v0.40.0
|
golang.org/x/crypto v0.40.0
|
||||||
google.golang.org/api v0.236.0
|
google.golang.org/api v0.236.0
|
||||||
|
|||||||
@@ -3333,10 +3333,15 @@ func buildSwaggerApp(resp http.ResponseWriter, body []byte, user shuffle.User, s
|
|||||||
// Read and copy the baseline Dockerfile
|
// Read and copy the baseline Dockerfile
|
||||||
dockerfileContent, err := ioutil.ReadFile(dockerfileSource)
|
dockerfileContent, err := ioutil.ReadFile(dockerfileSource)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("[ERROR] Failed to read baseline Dockerfile: %s", err)
|
foundDockerfile := shuffle.GetBaseDockerfile()
|
||||||
resp.WriteHeader(500)
|
if len(foundDockerfile) > 0 {
|
||||||
resp.Write([]byte(`{"success": false, "reason": "Failed to read baseline Dockerfile"}`))
|
dockerfileContent = foundDockerfile
|
||||||
return
|
} 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)
|
err = ioutil.WriteFile(dockerfileDestination, dockerfileContent, 0644)
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ services:
|
|||||||
- SHUFFLE_STATS_DISABLED=true
|
- SHUFFLE_STATS_DISABLED=true
|
||||||
- SHUFFLE_LOGS_DISABLED=true
|
- SHUFFLE_LOGS_DISABLED=true
|
||||||
- SHUFFLE_SWARM_CONFIG=run
|
- SHUFFLE_SWARM_CONFIG=run
|
||||||
|
- CLEANUP=false
|
||||||
- SHUFFLE_WORKER_IMAGE=ghcr.io/shuffle/shuffle-worker:latest
|
- SHUFFLE_WORKER_IMAGE=ghcr.io/shuffle/shuffle-worker:latest
|
||||||
env_file: .env
|
env_file: .env
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|||||||
@@ -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
|
return workerUrls, nil
|
||||||
}
|
}
|
||||||
@@ -3615,7 +3614,10 @@ func findAppInfoKubernetes(image, name string, env []string) error {
|
|||||||
|
|
||||||
for _, deployment := range deployments.Items {
|
for _, deployment := range deployments.Items {
|
||||||
if deployment.Name == name {
|
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
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user