Skip to content

Commit

Permalink
chore(deps): update anchore/sbom-action action to v0.16.0 (#287)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
renovate[bot] authored and laoshanxi committed May 26, 2024
1 parent b0ddabc commit 07bb084
Show file tree
Hide file tree
Showing 35 changed files with 1,280 additions and 415 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-github-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Download Syft
id: syft
uses: anchore/sbom-action/download-syft@v0.15.11
uses: anchore/sbom-action/download-syft@v0.16.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
contents: read

steps:
- uses: actions/checkout@v4
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
Expand All @@ -32,51 +33,95 @@ jobs:
uses: addnab/docker-run-action@v3
with:
image: centos:7
options: -v ${{ github.workspace }}:/work
shell: bash
run: |
yum install -y https://github.com/laoshanxi/app-mesh/releases/download/${{ env.APPMESH_VERSION }}/appmesh_2.1.2_gcc_4.8.5_glibc_2.17_x86_64.rpm
# start appmesh
/opt/appmesh/script/appmesh-entrypoint.sh &
sleep 5
appc ls
# test appmesh golang sdk
(cd src/sdk/go && go test -v)
# test appmesh python sdk
yum install -y python3 python3-pip
python3 -m pip install --upgrade appmesh pyotp
(cd /work/test/python && python3 -m unittest)
- name: test ubuntu:18
uses: addnab/docker-run-action@v3
with:
image: ubuntu:18.04
options: -v ${{ github.workspace }}:/work
shell: bash
run: |
apt update
apt install -y wget iputils-ping
wget --quiet --no-check-certificate https://github.com/laoshanxi/app-mesh/releases/download/${{ env.APPMESH_VERSION }}/appmesh_2.1.2_gcc_7_glibc_2.27_x86_64.deb
apt install -y ./appmesh_*.deb
# start appmesh
/opt/appmesh/script/appmesh-entrypoint.sh &
sleep 5
appc ls
# test appmesh golang sdk
(cd /work/src/sdk/go && go test -v)
# test appmesh python sdk
apt install -y python3 python3-pip
python3 -m pip install --upgrade appmesh pyotp
(cd /work/test/python && python3 -m unittest)
- name: test ubuntu:22
uses: addnab/docker-run-action@v3
with:
image: ubuntu:22.04
options: -v ${{ github.workspace }}:/work
shell: bash
run: |
apt update
apt install -y wget iputils-ping
wget --quiet --no-check-certificate https://github.com/laoshanxi/app-mesh/releases/download/${{ env.APPMESH_VERSION }}/appmesh_2.1.2_gcc_11_glibc_2.35_x86_64.deb
apt install -y ./appmesh_*.deb
# start appmesh
/opt/appmesh/script/appmesh-entrypoint.sh &
sleep 5
appc ls
# test appmesh golang sdk
(cd /work/src/sdk/go && go test -v)
# test appmesh python sdk
apt install -y python3 python3-pip
python3 -m pip install --upgrade appmesh pyotp
(cd /work/test/python && python3 -m unittest)
- name: test ubuntu:24
uses: addnab/docker-run-action@v3
with:
image: ubuntu:24.04
options: -v ${{ github.workspace }}:/work
shell: bash
run: |
apt update
apt install -y wget iputils-ping
wget --quiet --no-check-certificate https://github.com/laoshanxi/app-mesh/releases/download/${{ env.APPMESH_VERSION }}/appmesh_2.1.2_gcc_13_glibc_2.39_x86_64.deb
apt install -y ./appmesh_*.deb
# start appmesh
/opt/appmesh/script/appmesh-entrypoint.sh &
sleep 5
appc ls
# test appmesh golang sdk
(cd /work/src/sdk/go && go test -v)
# test appmesh python sdk
apt install -y python3 python3-pip
python3 -m pip install --break-system-packages --upgrade appmesh pyotp
(cd /work/test/python && python3 -m unittest)
216 changes: 105 additions & 111 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,113 +1,107 @@
{
// 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": "Go Launch file",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${file}"
},
{
"name": "GDB: launch appsvc",
"type": "cppdbg",
"request": "launch",
"program": "/opt/appmesh/bin/appsvc",
"args": [],
"stopAtEntry": false,
"cwd": "/opt/appmesh/",
"environment": [
{
"name": "LD_LIBRARY_PATH",
"value": "${LD_LIBRARY_PATH}:/opt/appmesh/lib64:/usr/local/lib64:/usr/local/lib/"
}
],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "GDB: launch appc",
"type": "cppdbg",
"request": "launch",
"program": "/opt/appmesh/bin/appc",
"args": [
"run",
"-c",
"sh -c 'exit 2'",
"-t",
"5"
],
"stopAtEntry": false,
"cwd": "/opt/appmesh/",
"environment": [
{
"name": "LD_LIBRARY_PATH",
"value": "${LD_LIBRARY_PATH}:/opt/appmesh/lib64:/usr/local/lib64:/usr/local/lib/"
}
],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "GDB: attach appsvc",
"type": "cppdbg",
"request": "attach",
"program": "/opt/appmesh/bin/appsvc",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"justMyCode": false,
"console": "integratedTerminal"
},
{
"name": "G++: Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++ build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
]
// 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": "Go Launch file",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${file}"
},
{
"name": "GDB: launch appsvc",
"type": "cppdbg",
"request": "launch",
"program": "/opt/appmesh/bin/appsvc",
"args": [],
"stopAtEntry": false,
"cwd": "/opt/appmesh/",
"environment": [
{
"name": "LD_LIBRARY_PATH",
"value": "${LD_LIBRARY_PATH}:/opt/appmesh/lib64:/usr/local/lib64:/usr/local/lib/"
}
],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "GDB: launch appc",
"type": "cppdbg",
"request": "launch",
"program": "/opt/appmesh/bin/appc",
"args": ["run", "-c", "sh -c 'exit 2'", "-t", "5"],
"stopAtEntry": false,
"cwd": "/opt/appmesh/",
"environment": [
{
"name": "LD_LIBRARY_PATH",
"value": "${LD_LIBRARY_PATH}:/opt/appmesh/lib64:/usr/local/lib64:/usr/local/lib/"
}
],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "GDB: attach appsvc",
"type": "cppdbg",
"request": "attach",
"program": "/opt/appmesh/bin/appsvc",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Python: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"justMyCode": false,
"console": "integratedTerminal"
},
{
"name": "G++: Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++ build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
]
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ENTRYPOINT ["tini", "--", "/appmesh-entrypoint.sh"]
##################################################################################
# docker container, accept parameters as bellow format:
# 1. Run docker container and register a long running application
# docker run -d laoshanxi/appmesh ping www.baidu.com
# docker run -d laoshanxi/appmesh ping github.com
# 2. Run docker container and excute an external cmd
# docker run -d laoshanxi/appmesh appc ls
##################################################################################
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Cloud native | Schedule cloud level applications for running on multile hosts wi
Micro service application | ⚡️ [Consul micro-service cluster management](https://app-mesh.readthedocs.io/en/latest/CONSUL.html)
Extra Features | Collect host/app resource usage <br> Remote run shell commands <br> Download/Upload files interface <br> Hot-update support `systemctl reload appmesh` <br> Bash completion <br> Reverse proxy <br> [Web GUI](https://github.com/laoshanxi/app-mesh-ui)
Platform support | X86_64 <br> ARM32 <br> ARM64
SDK | [Python](https://app-mesh.readthedocs.io/en/latest/api/appmesh_client.html) <br> [Golang](https://github.com/laoshanxi/app-mesh/blob/main/src/sdk/go/appmesh_client.go)
SDK | [Python](https://app-mesh.readthedocs.io/en/latest/api/appmesh_client.html) <br> [Golang](https://github.com/laoshanxi/app-mesh/blob/main/src/sdk/go/appmesh_client.go) <br> Swagger `https://localhost:6060/swagger`

## Getting started

Expand Down
8 changes: 4 additions & 4 deletions docs/source/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ ID NAME OWNER STATUS HEALTH PID MEMORY %CPU RETURN LAST_START_TIM
1 qqmail admin enabled 0 - - - 0 2021-03-26 10:54:26+08 sh /opt/qqmail/launch.sh
2 ssd admin enabled 1 - - - - - /usr/sbin/fstrim -a -v
3 loki admin enabled 0 4789 3.1 Mi 0 2 2021-03-26 08:03:37+08 ping www.sina.com
4 ping admin enabled 0 4790 3.1 Mi 0 2 2021-03-26 08:03:37+08 ping www.baidu.com
4 ping admin enabled 0 4790 3.1 Mi 0 2 2021-03-26 08:03:37+08 ping github.com
5 docker enabled 0 2866 2.5 Mi 0 - 2021-03-26 08:03:28+08 ping www.sina.com
```

- View application output

```text
$ appc add -n ping -c 'ping www.baidu.com'
$ appc add -n ping -c 'ping github.com'
{
"command": "ping www.baidu.com",
"command": "ping github.com",
"name": "ping",
"owner": "admin",
"register_time": "2020-10-24 07:31:40+08",
Expand All @@ -72,7 +72,7 @@ $ appc add -n ping -c 'ping www.baidu.com'
$ appc view -n ping
{
"command": "ping www.baidu.com",
"command": "ping github.com",
"cpu": 0,
"fd": 5,
"health": 0,
Expand Down
2 changes: 1 addition & 1 deletion docs/source/Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Method | URI | Body/Headers | Desc
---|---|---|---
POST| /appmesh/login | Username=base64(USER-NAME) <br> Password=base64(PASSWD) <br> Optional: <br> Expire-Seconds=600 <br> Totp=base64(TOTP_KEY) | User login, return JWT token or Totp-Challenge for TOTP validate next
POST| /appmesh/login | Authorization=Basic base64(NAME:PASSWD) <br> Optional: <br> Expire-Seconds=600 <br> Totp=base64(TOTP_KEY) | User login, return JWT token or Totp-Challenge for TOTP validate next
POST | /appmesh/totp/validate | Totp=base64(TOTP_KEY) <br> Totp-Challenge=base64(TOTP_CHALLENGE) | Validate TOTP key (valid and not expired) and challenge, return JWT token
POST| /appmesh/auth | Authorization="Bearer <JWT_TOKEN>" <br> Optional: <br> Auth-Permission=<PERMISSION-ID> | JWT token and permission authenticate
POST| /appmesh/token/renew | Authorization="Bearer <JWT_TOKEN>" <br> Optional: <br> Expire-Seconds=600 | Logoff old token and return new token
Expand Down
2 changes: 1 addition & 1 deletion docs/source/GrafanaDataSource.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ After that, you could see simplejson data source plugin from Grafana.

### Add App Mesh data source to monitor applications

Add simplejson data source with URL `http://appmesh_server:6060/appmesh/grafana`
Add simplejson data source with URL `http://appmesh_server:6060/appmesh_grafana`

![datasource](https://raw.githubusercontent.com/laoshanxi/picture/master/grafana/02_add_appmesh.png)

Expand Down
Loading

0 comments on commit 07bb084

Please sign in to comment.