Skip to content

Code Editor Improve #11

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apk add -Uuv --no-cache python3 \
&& apk add ca-certificates && pip3 install --no-cache-dir --upgrade pip setuptools wheel \
&& pip3 install requests flask markdown

ADD https://github.com/alexellis/faas/releases/download/0.5.6-alpha/fwatchdog /usr/bin
ADD https://github.com/alexellis/faas/releases/download/0.5.8-alpha/fwatchdog /usr/bin

RUN chmod +x /usr/bin/fwatchdog

Expand Down
2 changes: 1 addition & 1 deletion k8s_templates/aci-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ spec:
image: jockdarock/time2csharp:latest
imagePullPolicy: Always
name: csharp-experimental
nodename: aci-connector
nodeName: aci-connector

---
apiVersion: extensions/v1beta1
Expand Down
194 changes: 14 additions & 180 deletions k8s_templates/faas_function_k8s.yml
Original file line number Diff line number Diff line change
@@ -1,195 +1,32 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: csharp-experimental
spec:
replicas: 0
rollbackTo:
revision: 0
selector:
matchLabels:
app: time2code
component: csharp-experimental
strategy:
rollingUpdate:
maxSurge: 1000
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
labels:
app: time2code
component: csharp-experimental
spec:
containers:
- env:
- name: fprocess
value: python3 time2CSharp.py
- name: https_proxy
value: $https_proxy
- name: no_proxy
value: gateway
- name: read_timeout
value: "60"
- name: write_timeout
value: "60"
image: jockdarock/time2csharp:latest
imagePullPolicy: Always
name: csharp-experimental
nodeSelector:
dedicated: aci-connector

---
apiVersion: extensions/v1beta1
kind: Deployment
apiVersion: v1
kind: Service
metadata:
name: golang
spec:
replicas: 1
rollbackTo:
revision: 0
selector:
matchLabels:
app: time2code
component: golang
strategy:
rollingUpdate:
maxSurge: 1000
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: time2code
component: golang
spec:
containers:
- env:
- name: fprocess
value: python3 time2go.py
- name: https_proxy
value: $https_proxy
- name: no_proxy
value: gateway
- name: read_timeout
value: "60"
- name: write_timeout
value: "60"
image: jockdarock/time2go:latest
imagePullPolicy: Always
name: golang
nodeSelector:
dedicated: aci-connector

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nodejs
spec:
replicas: 0
rollbackTo:
revision: 0
selector:
matchLabels:
app: time2code
component: nodejs
strategy:
rollingUpdate:
maxSurge: 1000
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
labels:
app: time2code
component: nodejs
spec:
containers:
- env:
- name: fprocess
value: python3 time2nodejs.py
- name: https_proxy
value: $https_proxy
- name: no_proxy
value: gateway
- name: read_timeout
value: "60"
- name: write_timeout
value: "60"
image: jockdarock/time2nodejs:latest
imagePullPolicy: Always
name: nodejs
nodeSelector:
dedicated: aci-connector

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: powershell
name: python
namespace: default
spec:
replicas: 0
rollbackTo:
revision: 0
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
matchLabels:
app: time2code
component: powershell
strategy:
rollingUpdate:
maxSurge: 1000
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
labels:
app: time2code
component: powershell
spec:
containers:
- env:
- name: fprocess
value: python3 time2powershell.py
- name: https_proxy
value: $https_proxy
- name: no_proxy
value: gateway
- name: read_timeout
value: "60"
- name: write_timeout
value: "60"
image: jockdarock/time2powershell:latest
imagePullPolicy: Always
name: powershell
volumeMounts: null
volumes: null
nodeSelector:
dedicated: aci-connector

faas_function: python
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: python
spec:
replicas: 0
replicas: 1
rollbackTo:
revision: 0
selector:
matchLabels:
app: time2code
component: python
strategy:
rollingUpdate:
maxSurge: 1000
maxUnavailable: 0
type: RollingUpdate
faas_function: python
template:
metadata:
name: python
labels:
app: time2code
component: python
faas_function: python
spec:
containers:
- env:
Expand All @@ -206,7 +43,4 @@ spec:
image: jockdarock/time2py:latest
imagePullPolicy: Always
name: python
volumeMounts: null
volumes: null
nodeSelector:
dedicated: aci-connector
nodeName: aci-connector
16 changes: 11 additions & 5 deletions templates/index-panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.8/ace.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://cdn.rawgit.com/replit/jq-console/8baeef38/lib/jqconsole.js" type="text/javascript" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xterm/2.8.1/xterm.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/xterm/2.8.1/xterm.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xterm/2.8.1/addons/fit/fit.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xterm/2.9.2/xterm.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/xterm/2.9.2/xterm.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xterm/2.9.2/addons/fit/fit.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xterm/2.9.2/addons/fullscreen/fullscreen.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xterm/2.9.2/addons/fullscreen/fullscreen.css"></script>

<style>
html, body {
Expand Down Expand Up @@ -340,7 +342,9 @@
return new Promise(resolve => setTimeout(resolve, ms));
}

var term = new Terminal({cursorBlink: false, rows: 40});
var term = new Terminal({cursorBlink: false});
term.fit;
term.wraparoundMode = true;
term.open(document.getElementById('terminal'));

function termchange() {
Expand Down Expand Up @@ -375,7 +379,9 @@
async function termclear() {
term.destroy();
await sleep(100);
term = new Terminal({cursorBlink: false, rows: 40});
term = new Terminal({cursorBlink: false});
term.fit;
term.wraparoundMode = true;
term.open(document.getElementById('terminal'));
};
</script>
Expand Down
6 changes: 5 additions & 1 deletion time2code-faas-cli-functions.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
provider:
name: faas
gateway: http://localhost:31112
gateway: http://localhost:8080

functions:
time2code:
fprocess: python handler.py
image: jockdarock/cgi_t2c:latest

golang:
fprocess: python3 time2go.py
image: jockdarock/time2go:latest
Expand Down
Loading