Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
koba1t committed Feb 2, 2020
1 parent 4127bb6 commit 216db37
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
# vscode-as-a-service
vscode-as-a-service

This project helps to provide[vscode on remote server](https://github.com/cdr/code-server) on kubernetes.

This project can provide for many user.

## Requirement
Set up [kubernetes](https://github.com/kubernetes/kubernetes) cluster and install [ESC](https://github.com/koba1t/ESC).

## Install
Apply container template resource.
```
kubectl apply -f config/esc/template.yaml
```

And, apply users resource.

```
kubectl apply -f config/esc/user1.yaml
kubectl apply -f config/esc/user2.yaml
kubectl apply -f config/esc/user3.yaml
```

19 changes: 19 additions & 0 deletions config/esc/template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: esc.k06.in/v1alpha1
kind: Template
metadata:
name: vscode
spec:
# Add fields here
template:
spec:
containers:
- image: codercom/code-server:v2
name: code-server
args: ["--auth","none"]
service:
ports:
- name: 80-80
port: 80
protocol: TCP
targetPort: 8080

7 changes: 7 additions & 0 deletions config/esc/user1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: esc.k06.in/v1alpha1
kind: Userland
metadata:
name: user1
spec:
# Add fields here
templateName: template-sample
7 changes: 7 additions & 0 deletions config/esc/user2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: esc.k06.in/v1alpha1
kind: Userland
metadata:
name: user2
spec:
# Add fields here
templateName: template-sample
7 changes: 7 additions & 0 deletions config/esc/user3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: esc.k06.in/v1alpha1
kind: Userland
metadata:
name: user3
spec:
# Add fields here
templateName: template-sample

0 comments on commit 216db37

Please sign in to comment.