Added sample proxy server for testing with orborus

This commit is contained in:
frikky
2022-02-17 23:06:01 +01:00
parent f0bd2cafbf
commit 0df7bdd970
7 changed files with 120 additions and 60 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ require (
github.com/h2non/filetype v1.1.3 github.com/h2non/filetype v1.1.3
github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20170819232839-0fbfe93532da // indirect github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20170819232839-0fbfe93532da // indirect
github.com/satori/go.uuid v1.2.0 github.com/satori/go.uuid v1.2.0
github.com/shuffle/shuffle-shared v0.1.98 github.com/shuffle/shuffle-shared v0.2.3
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce
google.golang.org/api v0.65.0 google.golang.org/api v0.65.0
+2 -3
View File
@@ -1,7 +1,7 @@
version: '3' version: '3'
services: services:
frontend: frontend:
build: ./frontend #build: ./frontend
image: ghcr.io/frikky/shuffle-frontend:nightly image: ghcr.io/frikky/shuffle-frontend:nightly
container_name: shuffle-frontend container_name: shuffle-frontend
hostname: shuffle-frontend hostname: shuffle-frontend
@@ -16,7 +16,7 @@ services:
depends_on: depends_on:
- backend - backend
backend: backend:
build: ./backend #build: ./backend
image: ghcr.io/frikky/shuffle-backend:nightly image: ghcr.io/frikky/shuffle-backend:nightly
container_name: shuffle-backend container_name: shuffle-backend
hostname: ${BACKEND_HOSTNAME} hostname: ${BACKEND_HOSTNAME}
@@ -48,7 +48,6 @@ services:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
environment: environment:
- SHUFFLE_WORKER_VERSION=nightly - SHUFFLE_WORKER_VERSION=nightly
- ORG_ID=${ORG_ID}
- ENVIRONMENT_NAME=${ENVIRONMENT_NAME} - ENVIRONMENT_NAME=${ENVIRONMENT_NAME}
- BASE_URL=http://${OUTER_HOSTNAME}:${BACKEND_PORT} - BASE_URL=http://${OUTER_HOSTNAME}:${BACKEND_PORT}
- DOCKER_API_VERSION=1.40 - DOCKER_API_VERSION=1.40
+7 -3
View File
@@ -659,7 +659,8 @@ const AngularWorkflow = (defaultprops) => {
}); });
const newitem = removeParam("execution_id", cursearch); const newitem = removeParam("execution_id", cursearch);
props.history.push(curpath + newitem); navigate(curpath + newitem)
//props.history.push(curpath + newitem);
} }
} }
} }
@@ -3576,7 +3577,8 @@ const AngularWorkflow = (defaultprops) => {
) { ) {
setExecutionModalOpen(true) setExecutionModalOpen(true)
const newitem = removeParam("execution_highlight", cursearch); const newitem = removeParam("execution_highlight", cursearch);
props.history.push(curpath + newitem); navigate(curpath + newitem)
//props.history.push(curpath + newitem);
} }
const tmpView = new URLSearchParams(cursearch).get("view"); const tmpView = new URLSearchParams(cursearch).get("view");
@@ -3588,7 +3590,9 @@ const AngularWorkflow = (defaultprops) => {
setExecutionModalOpen(true); setExecutionModalOpen(true);
const newitem = removeParam("view", cursearch); const newitem = removeParam("view", cursearch);
props.history.push(curpath + newitem); navigate(curpath + newitem)
//navigate(`?execution_highlight=${parsed_url}`)
//props.history.push(curpath + newitem);
} }
return; return;
} }
+48 -46
View File
@@ -2226,53 +2226,55 @@ const GettingStarted = (props) => {
return ( return (
<div style={viewStyle}> <div style={viewStyle}>
<Dialog {isCloud ?
open={videoViewOpen} <Dialog
onClose={() => { open={videoViewOpen}
setVideoViewOpen(false) onClose={() => {
}} setVideoViewOpen(false)
PaperProps={{ }}
style: { PaperProps={{
backgroundColor: surfaceColor, style: {
color: "white", backgroundColor: surfaceColor,
minWidth: 560, color: "white",
minHeight: 415, minWidth: 560,
textAlign: "center", minHeight: 415,
}, textAlign: "center",
}} },
> }}
<DialogTitle>
Welcome to Shuffle!
</DialogTitle>
<Tooltip
title="Close window"
placement="top"
style={{ zIndex: 10011 }}
>
<IconButton
style={{ zIndex: 5000, position: "absolute", top: 10, right: 34 }}
onClick={(e) => {
e.preventDefault();
setVideoViewOpen(false)
}}
>
<CloseIcon style={{ color: "white" }} />
</IconButton>
</Tooltip>
<iframe
width="560"
height="315"
style={{margin: "0px auto 0px auto", width: 560, height: 315,}}
src="https://www.youtube-nocookie.com/embed/rO7k9q3OgC0"
title="Introduction video"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
> >
</iframe> <DialogTitle>
</Dialog> Welcome to Shuffle!
</DialogTitle>
<Tooltip
title="Close window"
placement="top"
style={{ zIndex: 10011 }}
>
<IconButton
style={{ zIndex: 5000, position: "absolute", top: 10, right: 34 }}
onClick={(e) => {
e.preventDefault();
setVideoViewOpen(false)
}}
>
<CloseIcon style={{ color: "white" }} />
</IconButton>
</Tooltip>
<iframe
width="560"
height="315"
style={{margin: "0px auto 0px auto", width: 560, height: 315,}}
src="https://www.youtube-nocookie.com/embed/rO7k9q3OgC0"
title="Introduction video"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
>
</iframe>
</Dialog>
: null}
<div style={workflowViewStyle}> <div style={workflowViewStyle}>
<Typography variant="h1" style={{fontSize: 30, marginTop: 25, }}> <Typography variant="h1" style={{fontSize: 30, marginTop: 25, }}>
Getting Started with Shuffle Getting Started with Shuffle
+1 -1
View File
@@ -1,5 +1,5 @@
NAME=shuffle-orborus NAME=shuffle-orborus
VERSION=0.9.58 VERSION=0.9.59
echo "Running docker build with $NAME:$VERSION" echo "Running docker build with $NAME:$VERSION"
#docker rmi frikky/shuffle:$NAME --force #docker rmi frikky/shuffle:$NAME --force
+54
View File
@@ -0,0 +1,54 @@
#
# curl -H "Org-id: Shuffle" --proxy "http://192.168.86.45:8081" http://192.168.86.45:5001/api/v1/workflows/queue
import SocketServer
import SimpleHTTPServer
import requests
import json
PORT = 8082
class MyProxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_GET(self):
url=self.path[:]
allheaders = {}
for item in ("%s" % self.headers).split("\n"):
headersplit = item.split(":")
if len(headersplit) == 2:
allheaders[headersplit[0]] = (headersplit[1][:-1]).strip()
ret = requests.get(url, headers=allheaders)
print("RESP (%s) - %d - %s" % (url, ret.status_code, ret.text))
self.send_response(ret.status_code)
self.end_headers()
self.wfile.write(ret.text)
def do_POST(self):
url=self.path[:]
allheaders = {}
for item in ("%s" % self.headers).split("\n"):
headersplit = item.split(":")
if len(headersplit) == 2:
allheaders[headersplit[0]] = (headersplit[1][:-1]).strip()
length = int(self.headers.getheader('content-length'))
try:
message = json.loads(self.rfile.read(length))
print("Got message: %s" % message)
ret = requests.post(url, headers=allheaders, json=message)
except:
message = self.rfile.read(length)
print("Got message: %s" % message)
ret = requests.post(url, headers=allheaders, data=message)
print("RESP (%s) - %d - %s" % (url, ret.status_code, ret.text))
self.send_response(ret.status_code)
self.end_headers()
self.wfile.write(ret.text)
httpd = SocketServer.ForkingTCPServer(('', PORT), MyProxy)
print("Now serving at %d" % PORT)
httpd.serve_forever()
+7 -6
View File
@@ -1,9 +1,10 @@
docker run \ docker run \
--env ORG_ID=$ORG_ID \ --env DOCKER_API_VERSION=1.40 \
--env ENVIRONMENT_NAME="Shuffle" \ --env ENVIRONMENT_NAME="Shuffle" \
--env BASE_URL=http://shuffle-backend:5001 \ --env BASE_URL="http://192.168.86.45:5001" \
--env DOCKER_API_VERSION=1.42 \ --env HTTP_PROXY="http://192.168.86.45:8082" \
--env RUNNING_MODE="Docker" \ --env HTTPS_PROXY="https://192.168.86.45:8082" \
--network "shuffle_shuffle" \ --env SHUFFLE_PASS_WORKER_PROXY=true \
--env SHUFFLE_PASS_APP_PROXY=true \
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock \
frikky/shuffle:orborus ghcr.io/frikky/shuffle-orborus:nightly