Tons of priority management fixes - both frontend & backend

This commit is contained in:
frikky
2023-06-23 01:08:11 +02:00
parent c9076e7124
commit e319f0e9b1
21 changed files with 482 additions and 15870 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
NAME=shuffle-orborus
VERSION=1.2.0
VERSION=1.2.1
echo "Running docker build with $NAME:$VERSION"
#docker rmi frikky/shuffle:$NAME --force
+15 -20
View File
@@ -207,10 +207,6 @@ func deployServiceWorkers(image string) {
// Looks for and cleans up all existing items in swarm we can't re-use (Shuffle only)
// frikky@debian:~/git/shuffle/functions/onprem/worker$ docker service create --replicas 5 --name shuffle-workers --env SHUFFLE_SWARM_CONFIG=run --publish published=33333,target=33333 ghcr.io/shuffle/shuffle-worker:nightly
networkName := "shuffle_swarm_executions"
if len(swarmNetworkName) > 0 {
networkName = swarmNetworkName
}
ingressOptions := types.NetworkCreate{
Driver: "overlay",
@@ -239,6 +235,11 @@ func deployServiceWorkers(image string) {
//docker network create --driver=overlay workers
// Specific subnet?
networkName := "shuffle_swarm_executions"
if len(swarmNetworkName) > 0 {
networkName = swarmNetworkName
}
networkCreateOptions := types.NetworkCreate{
Driver: "overlay",
Attachable: true,
@@ -313,15 +314,6 @@ func deployServiceWorkers(image string) {
//}
}
//serviceOptions := types.ServiceCreateOptions{}
//service, err := dockercli.ServiceCreate(
// context.Background(),
// serviceSpec,
// serviceOptions,
//)
//containerName := fmt.Sprintf("shuffle-worker-%s", parsedUuid)
replicas := uint64(1)
scaleReplicas := os.Getenv("SHUFFLE_SCALE_REPLICAS")
if len(scaleReplicas) > 0 {
@@ -336,7 +328,6 @@ func deployServiceWorkers(image string) {
}
innerContainerName := fmt.Sprintf("shuffle-workers")
cnt, _ := findActiveSwarmNodes()
nodeCount := uint64(1)
if cnt > 0 {
@@ -372,8 +363,12 @@ func deployServiceWorkers(image string) {
swarm.NetworkAttachmentConfig{
Target: networkName,
},
swarm.NetworkAttachmentConfig{
Target: "ingress",
},
},
EndpointSpec: &swarm.EndpointSpec{
Mode: "vip",
Ports: []swarm.PortConfig{
swarm.PortConfig{
Protocol: swarm.PortConfigProtocolTCP,
@@ -403,9 +398,9 @@ func deployServiceWorkers(image string) {
fmt.Sprintf("TZ=%s", timezone),
fmt.Sprintf("SHUFFLE_LOGS_DISABLED=%s", os.Getenv("SHUFFLE_LOGS_DISABLED")),
},
Hosts: []string{
innerContainerName,
},
//Hosts: []string{
// innerContainerName,
//},
},
RestartPolicy: &swarm.RestartPolicy{
Condition: swarm.RestartPolicyConditionOnFailure,
@@ -725,8 +720,8 @@ func initializeImages() {
}
if baseimagename == "" {
baseimagename = "shuffle/shuffle" // Dockerhub
baseimagename = "shuffle" // Github (ghcr.io)
baseimagename = "frikky/shuffle" // Dockerhub
baseimagename = "shuffle" // Github (ghcr.io)
log.Printf("[DEBUG] Setting baseimagename")
}
@@ -1560,6 +1555,6 @@ func sendWorkerRequest(workflowExecution shuffle.ExecutionRequest) error {
_ = body
log.Printf("[DEBUG] Ran worker from request with execution ID: %s. Worker URL: %s. DEBUGGING: docker service logs shuffle-workers | grep %s", workflowExecution.ExecutionId, streamUrl, workflowExecution.ExecutionId)
log.Printf("[DEBUG] Ran worker from request with execution ID: %s. Worker URL: %s. DEBUGGING: docker service logs shuffle-workers 2&>1 | grep %s", workflowExecution.ExecutionId, streamUrl, workflowExecution.ExecutionId)
return nil
}