Skip to content

Commit

Permalink
Merged PR 1551: Release 32 - stablility improvment and open source LI…
Browse files Browse the repository at this point in the history
…CENSE validation

Feature List
- All in One Dev-Conatiner Image
- k8s mode improvements
- Applicatoin Insight data point improvments

Related work items: #1390, #1703, #1756, #1770, #1783, #1784, #1792, #1793, #1795, #1831, #1834, #1836, #1837
  • Loading branch information
ups216 committed Jan 5, 2023
2 parents c191ea6 + 35aa8ac commit fb52a51
Show file tree
Hide file tree
Showing 345 changed files with 13,760 additions and 4,889 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.vscode/
.idea/
smartide.msi
*.deb
Empty file modified .ide/.gitignore
100644 → 100755
Empty file.
25 changes: 25 additions & 0 deletions .ide/.ide.docs.vmlc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: smartide/v0.3
orchestrator:
type: allinone
version: 3
workspace:
dev-container:
service-name: smartide-vmlc-vscode-go-dev

ports:
tools-webide-vscode: 6800
tools-ssh: 6822
apps-application: 1313
ide-type: vscode

volumes:
git-config: true
ssh-key: true
command:
- git submodule update --init --recursive
- cd docs
- npm install
- hugo server --bind 0.0.0.0 --disableFastRender --forceSyncStatic --buildDrafts --buildFuture

kube-deploy-files: "vscode-vmlc-k8s-deployment.yaml"
docker-compose-file: "vscode-vmlc-docker-compose.yaml"
25 changes: 25 additions & 0 deletions .ide/.ide.docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: smartide/v0.3
orchestrator:
type: allinone
version: 3
workspace:
dev-container:
service-name: smartide-vscode-go-dev

ports:
tools-webide-vscode: 6800
tools-ssh: 6822
apps-application: 1313
ide-type: vscode

volumes:
git-config: true
ssh-key: true
command:
- git submodule update --init --recursive
- cd docs
- npm install
- hugo server --bind 0.0.0.0 --disableFastRender --forceSyncStatic --buildDrafts --buildFuture

kube-deploy-files: "vscode-k8s-deployment.yaml"
docker-compose-file: "vscode-docker-compose.yaml"
59 changes: 46 additions & 13 deletions .ide/.ide.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,56 @@ orchestrator:
version: 3
workspace:
dev-container:
service-name: smartide-dev
ports: # 申明端口
service-name: smartide-vmlc-vscode-go-dev

ports:
tools-webide-vscode: 6800
tools-ssh: 6822
apps-hugo-website: 1313

ide-type: vscode #vscode/theia
ide-type: vscode

volumes:
git-config: true
ssh-key: true
command:
command:
- cd /home/project
- git submodule update --init --recursive
- cd docs
- npm install
- hugo server --bind 0.0.0.0 --disableFastRender --forceSyncStatic --buildDrafts --buildFuture
- go env -w GOPROXY=https://goproxy.cn,direct
- cd cli
- go111MODULE=on go install github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest
- go111MODULE=on go install github.com/ramya-rao-a/go-outline@latest
- go111MODULE=on go install github.com/cweill/gotests/gotests@latest
- go111MODULE=on go install github.com/fatih/gomodifytags@latest
- go111MODULE=on go install github.com/josharian/impl@latest
- go111MODULE=on go install github.com/haya14busa/goplay/cmd/goplay@latest
- go111MODULE=on go install github.com/go-delve/delve/cmd/dlv@latest
- go111MODULE=on go install honnef.co/go/tools/cmd/staticcheck@latest
- go111MODULE=on go install golang.org/x/tools/gopls@latest
- go mod tidy
- code --install-extension golang.go
# run in terminal: go run build or go run main.go

kube-deploy-files: "vscode-vmlc-k8s-deployment.yaml"
docker-compose-file: "vscode-vmlc-docker-compose.yaml"

kube-deploy-files: "k8s-deployment-vmlc.yaml"
docker-compose-file: "docker-compose-vmlc.yaml"
# default .ide.yaml for cli project
# add json file to: cli/.vscode/launch.json before use vscode debug
# {
# // Use IntelliSense to learn about possible attributes.
# // Hover to view descriptions of existing attributes.
# // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
# "version": "0.2.0",
# "configurations": [
# {
# "name": "List",
# "type": "go",
# "request": "launch",
# "trace": "verbose",
# "program": "${workspaceFolder}/cli",
# "args": [
# "list",
# "-d"
# ],
# "console": "integratedTerminal",
# "mode": "debug",
# },
# ]
# }
4 changes: 2 additions & 2 deletions .ide/k8s.ide.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ orchestrator:
version: 3
workspace:
dev-container:
service-name: smartide-docs-dev
service-name: smartide-vmlc-vscode-go-dev
webide-port: 6800

ports: # 申明端口
Expand All @@ -20,6 +20,6 @@ workspace:
- git submodule update --init --recursive
- cd docs
- npm install
- hugo server --bind 0.0.0.0 --disableFastRender --forceSyncStatic --buildDrafts --buildFuture
- hugo server --bind 0.0.0.0 --disableFastRender --forceSyncStatic --buildDrafts --buildFuture

kube-deploy-files: "*-deployment.yaml"
Empty file modified .ide/smartide-docs-deployment.yaml
100644 → 100755
Empty file.
21 changes: 21 additions & 0 deletions .ide/vscode-docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

version: "3"
services:
smartide-vscode-go-dev:
image: registry.cn-hangzhou.aliyuncs.com/smartide/smartide-golang-v2-vscode:latest
hostname: dev-container
restart: always
environment:
LOCAL_USER_PASSWORD: root123
volumes:
- .:/home/project
ports:
- 6822:22
- 6800:3000
- 1313:1313
networks:
- smartide-network

networks:
smartide-network:
external: true
76 changes: 76 additions & 0 deletions .ide/vscode-k8s-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---

apiVersion: apps/v1
kind: Deployment
metadata:
name: smartide-vscode-go-dev
spec:
replicas: 1
selector:
matchLabels:
boathouse-calculator.service: smartide-vscode-go
strategy:
type: Recreate
template:
metadata:
labels:
boathouse-calculator.service: smartide-vscode-go
spec:
containers:
- env:
- name: LOCAL_USER_PASSWORD
value: root123
image: registry.cn-hangzhou.aliyuncs.com/smartide/smartide-golang-v2-vscode:latest
imagePullPolicy: Always
name: smartide-vscode-go-dev
ports:
- containerPort: 3000
- containerPort: 22
- containerPort: 1313

resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "1Gi"
cpu: "500m"
status: {}

---

apiVersion: v1
kind: Service
metadata:
name: smartide-vscode-go-service
spec:
ports:
- name: "6800"
port: 6800
targetPort: 3000
- name: "6822"
port: 6822
targetPort: 22
- name: "1313"
port: 1313
targetPort: 1313
selector:
boathouse-calculator.service: smartide-vscode-go
status:
loadBalancer: {}

---

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: smartide-vscode-go-network
spec:
ingress:
- from:
- podSelector:
matchLabels:
smartide-vscode-go/smartide-network: "true"
podSelector:
matchLabels:
smartide-vscode-go/smartide-network: "true"
22 changes: 22 additions & 0 deletions .ide/vscode-vmlc-docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

version: "3"
services:
smartide-vmlc-vscode-go-dev:
image: registry.cn-hangzhou.aliyuncs.com/smartide/smartide-golang-v2-vscode-vmlc:latest
runtime: sysbox-runc
hostname: dev-container
restart: always
environment:
LOCAL_USER_PASSWORD: root123
volumes:
- .:/home/project
ports:
- 6822:22
- 6800:3000
- 1313:3000
networks:
- smartide-network

networks:
smartide-network:
external: true
70 changes: 70 additions & 0 deletions .ide/vscode-vmlc-k8s-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---

apiVersion: v1
kind: Pod
metadata:
name: smartide-vmlc-vscode-go-dev
annotations:
io.kubernetes.cri-o.userns-mode: "auto:size=65536"
labels:
smartide-go.service: smartide-go
spec:
runtimeClassName: sysbox-runc
containers:
- env:
- name: LOCAL_USER_PASSWORD
value: root123
name: smartide-vmlc-vscode-go-dev
image: registry.cn-hangzhou.aliyuncs.com/smartide/smartide-golang-v2-vscode-vmlc:latest
command: ["/sbin/init"]
imagePullPolicy: Always
ports:
- containerPort: 3000
- containerPort: 22
- containerPort: 1313
resources:
requests:
memory: "2Gi"
cpu: "2000m"
limits:
memory: "4Gi"
cpu: "3000m"


---

apiVersion: v1
kind: Service
metadata:
name: smartide-vmlc-vscode-go-dev
spec:
ports:
- name: "6800"
port: 6800
targetPort: 3000
- name: "6822"
port: 6822
targetPort: 22
- name: "1313"
port: 1313
targetPort: 1313
selector:
smartide-go.service: smartide-go
status:
loadBalancer: {}

---

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: smartide-go-network
spec:
ingress:
- from:
- podSelector:
matchLabels:
smartide-go/smartide-network: "true"
podSelector:
matchLabels:
smartide-go/smartide-network: "true"
21 changes: 16 additions & 5 deletions cli/cmd/common/appInsight.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
/*
* @Date: 2022-07-19 11:22:43
* @LastEditors: Jason Chen
* @LastEditTime: 2022-07-19 11:23:49
* @FilePath: /cli/cmd/common/appInsight.go
*/
SmartIDE - Dev Containers
Copyright (C) 2023 leansoftX.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package common

Expand Down
Loading

0 comments on commit fb52a51

Please sign in to comment.