Feat: upgrade the version to 1.4.2 (#728)

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
This commit is contained in:
barnettZQG 2022-06-13 17:05:37 +08:00 committed by GitHub
parent 92cbacfaa7
commit 23848964b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 329 additions and 74 deletions

View File

@ -29,7 +29,7 @@ If you don't need the automation with root access, you can download from the [re
- ** MacOS/Linux **
```shell
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash -s 1.4.1
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash -s 1.4.2
```
- **Windows**

View File

@ -39,7 +39,7 @@ KubeVela CLI provides an easy to engage and manage your application delivery in
** MacOS/Linux **
```shell script
curl -fsSl https://kubevela.net/script/install.sh | bash -s 1.4.1
curl -fsSl https://kubevela.net/script/install.sh | bash -s 1.4.2
```
**Windows**
@ -112,7 +112,7 @@ Refer to [using Vela CLI docker image](./system-operation/vela-cli-image) for mo
<TabItem value="vela">
```shell script
$ vela install --version v1.4.1
$ vela install --version v1.4.2
```
<details> <summary> check out the outcome </summary>
@ -155,7 +155,7 @@ If you are helm user, you can also use helm to install kubevela core:
```
helm repo add kubevela https://charts.kubevela.net/core
helm repo update
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version 1.4.1 --wait
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version 1.4.2 --wait
```
</TabItem>
@ -185,7 +185,7 @@ Please refer to [VelaUX Guide](../reference/addons/velaux).
** MacOS/Linux **
```shell script
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.4.1
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.4.2
```
**Windows**
@ -246,13 +246,13 @@ docker pull oamdev/vela-cli:latest
> Please make sure you already upgraded the Vela CLI to 1.4.1.
```shell
vela install --version v1.4.1
vela install --version v1.4.2
```
### 3. Upgrade VelaUX
```shell
vela addon enable velaux version=v1.4.0
vela addon enable velaux version=v1.4.2
```
> If you set custom parameters during installation, be sure to include the corresponding parameters.

View File

@ -23,18 +23,18 @@ kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.4/
```
helm repo add kubevela https://charts.kubevela.net/core
helm repo update
helm upgrade -n vela-system --install kubevela kubevela/vela-core --version 1.4.1 --wait
helm upgrade -n vela-system --install kubevela kubevela/vela-core --version 1.4.2 --wait
```
3. Download and upgrade to the corresponding CLI
```
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.4.1
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.4.2
```
3. Upgrade VelaUX or other addon
```
vela addon upgrade velaux --version 1.4.0
vela addon upgrade velaux --version 1.4.2
```
Please note if you're using terraform addon, you should upgrade the `terraform` addon to version `1.0.6+` along with the vela-core upgrade, you can follow the following steps:

View File

@ -5,7 +5,7 @@ title: VelaUX
## Install
```shell script
vela addon enable velaux
vela addon enable velaux --version=v1.4.2
```
expected output:
@ -30,6 +30,7 @@ Choose `> Cluster: local | Namespace: vela-system | Component: velaux | Kind: Se
## Setup with Specified Service Type
There are three service types for VelaUX addon which aligned with Kubernetes service, they're `ClusterIP`, `NodePort` and `LoadBalancer`.
By default the service type is ClusterIP for security.
If you want to expose your VelaUX dashboard for convenience, you can specify the service type.
@ -43,7 +44,7 @@ If you want to expose your VelaUX dashboard for convenience, you can specify the
vela addon enable velaux serviceType=NodePort
```
After specifying the service type to `LoadBalancer` or `NodePort`, you can obtain the access address through `vela status`:
After the service type specified to `LoadBalancer` or `NodePort`, you can obtain the access address through `vela status`:
```
vela status addon-velaux -n vela-system --endpoint
@ -63,7 +64,7 @@ The expected output:
If you have ingress and domain available in your cluster, you can also deploy VelaUX by specify a domain like below:
```bash
$ vela addon enable velaux domain=example.doamin.com
vela addon enable velaux domain=example.doamin.com
```
The expected output:
@ -82,7 +83,7 @@ Please access the velaux from the following endpoints:
If you enabled the traefik addon, you can set the `gatewayDriver` parameter to use the Gateway API.
```shell script
$ vela addon enable velaux domain=example.doamin.com gatewayDriver=traefik
vela addon enable velaux domain=example.doamin.com gatewayDriver=traefik
```
## Setup with MongoDB database
@ -90,7 +91,7 @@ $ vela addon enable velaux domain=example.doamin.com gatewayDriver=traefik
VelaUX supports the Kubernetes and MongoDB as the database. the default is Kubernetes. We strongly advise using the MongoDB database to power your production environment.
```shell script
$ vela addon enable velaux dbType=mongodb dbURL=mongodb://<MONGODB_USER>:<MONGODB_PASSWORD>@<MONGODB_URL>
vela addon enable velaux dbType=mongodb dbURL=mongodb://<MONGODB_USER>:<MONGODB_PASSWORD>@<MONGODB_URL>
```
## Specify the addon image

View File

@ -25,7 +25,7 @@ import TabItem from '@theme/TabItem';
- ** MacOS/Linux **
```shell
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash -s 1.4.1
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash -s 1.4.2
```
- **Windows**

View File

@ -37,7 +37,7 @@ KubeVela CLI 提供了常用的集群和应用管理能力。
** MacOS/Linux **
```shell script
curl -fsSl https://kubevela.net/script/install.sh | bash -s 1.4.1
curl -fsSl https://kubevela.net/script/install.sh | bash -s 1.4.2
```
**Windows**
@ -108,7 +108,7 @@ GolangVersion: go1.17.10
<TabItem value="vela">
```shell script
$ vela install --version v1.4.1
$ vela install --version v1.4.2
```
<details> <summary> 正常安装出现下述日志 </summary>
@ -151,7 +151,7 @@ If you want to enable dashboard, please run "vela addon enable velaux"
```
helm repo add kubevela https://charts.kubevela.net/core
helm repo update
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version 1.4.1 --wait
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version 1.4.2 --wait
```
</TabItem>
@ -179,7 +179,7 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --ver
** MacOS/Linux **
```shell script
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.4.1
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.4.2
```
**Windows**
@ -237,10 +237,10 @@ docker pull oamdev/vela-cli:latest
### 2. 升级 Vela Core
> 请先升级 Vela CLI 到 1.4.1 版本。
> 请先升级 Vela CLI 到 1.4.1+ 版本。
```shell
vela install --version v1.4.1
vela install --version v1.4.2
```
### 3. 升级 VelaUX

View File

@ -5,7 +5,7 @@ title: VelaUX 控制台
## Install
```shell script
vela addon enable velaux
vela addon enable velaux --version=v1.4.2
```
expected output:
@ -43,7 +43,7 @@ If you want to expose your VelaUX dashboard for convenience, you can specify the
vela addon enable velaux serviceType=NodePort
```
After specifying the service type to `LoadBalancer` or `NodePort`, you can obtain the access address through `vela status`:
After the service type specified to `LoadBalancer` or `NodePort`, you can obtain the access address through `vela status`:
```
vela status addon-velaux -n vela-system --endpoint
@ -63,7 +63,7 @@ The expected output:
If you have ingress and domain available in your cluster, you can also deploy VelaUX by specify a domain like below:
```bash
$ vela addon enable velaux domain=example.doamin.com
vela addon enable velaux domain=example.doamin.com
```
The expected output:
@ -82,7 +82,7 @@ Please access the velaux from the following endpoints:
If you enabled the traefik addon, you can set the `gatewayDriver` parameter to use the Gateway API.
```shell script
$ vela addon enable velaux domain=example.doamin.com gatewayDriver=traefik
vela addon enable velaux domain=example.doamin.com gatewayDriver=traefik
```
## Setup with MongoDB database
@ -90,14 +90,14 @@ $ vela addon enable velaux domain=example.doamin.com gatewayDriver=traefik
VelaUX supports the Kubernetes and MongoDB as the database. the default is Kubernetes. We strongly advise using the MongoDB database to power your production environment.
```shell script
$ vela addon enable velaux dbType=mongodb dbURL=mongodb://<MONGODB_USER>:<MONGODB_PASSWORD>@<MONGODB_URL>
vela addon enable velaux dbType=mongodb dbURL=mongodb://<MONGODB_USER>:<MONGODB_PASSWORD>@<MONGODB_URL>
```
## Specify the addon image
By default the image repo is docker hub, you can specify the image repo by the `repo` parameter:
```
```shell script
vela addon enable velaux repo=acr.kubevela.net
```

View File

@ -25,7 +25,7 @@ import TabItem from '@theme/TabItem';
- ** MacOS/Linux **
```shell
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash -s 1.4.1
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash -s 1.4.2
```
- **Windows**

View File

@ -37,7 +37,7 @@ KubeVela CLI 提供了常用的集群和应用管理能力。
** MacOS/Linux **
```shell script
curl -fsSl https://kubevela.net/script/install.sh | bash -s 1.4.1
curl -fsSl https://kubevela.net/script/install.sh | bash -s 1.4.2
```
**Windows**
@ -108,7 +108,7 @@ GolangVersion: go1.17.10
<TabItem value="vela">
```shell script
$ vela install --version v1.4.1
$ vela install --version v1.4.2
```
<details> <summary> 正常安装出现下述日志 </summary>
@ -151,7 +151,7 @@ If you want to enable dashboard, please run "vela addon enable velaux"
```
helm repo add kubevela https://charts.kubevela.net/core
helm repo update
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version 1.4.1 --wait
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version 1.4.2 --wait
```
</TabItem>
@ -179,7 +179,7 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --ver
** MacOS/Linux **
```shell script
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.4.1
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.4.2
```
**Windows**
@ -237,10 +237,10 @@ docker pull oamdev/vela-cli:latest
### 2. 升级 Vela Core
> 请先升级 Vela CLI 到 1.4.1 版本。
> 请先升级 Vela CLI 到 1.4.1+ 版本。
```shell
vela install --version v1.4.1
vela install --version v1.4.2
```
### 3. 升级 VelaUX

View File

@ -1,22 +1,21 @@
---
title: 启用 VelaUX 控制台
title: VelaUX 控制台
---
## Install
```shell script
vela addon enable velaux
vela addon enable velaux --version=v1.4.2
```
expected output:
```
Addon: velaux enabled Successfully.
```
VelaUX need authentication. Default username is `admin` and the password is `VelaUX12345`. Please must set and remember the new password after the first login.
VelaUX needs authentication. The default username is `admin` and the password is `VelaUX12345`. Please must set and remember the new password after the first login.
By default, velaux didn't have any exposed port.
By default, VelaUX didn't have any exposed port.
## Visit VelaUX by port-forward
@ -33,25 +32,24 @@ Choose `> Cluster: local | Namespace: vela-system | Component: velaux | Kind: Se
There are three service types for VelaUX addon which aligned with Kubernetes service, they're `ClusterIP`, `NodePort` and `LoadBalancer`.
By default the service type is ClusterIP for security.
If you want to expose your VelaUX dashboard for convenient, you can specify the service type.
If you want to expose your VelaUX dashboard for convenience, you can specify the service type.
- `LoadBalancer` type requires your cluster has cloud LoadBalancer available.
```shell script
vela addon enable velaux serviceType=LoadBalancer
```
```shell script
vela addon enable velaux serviceType=LoadBalancer
```
- `NodePort` type requires you can access the Kubernetes Node IP/Port.
```shell script
vela addon enable velaux serviceType=NodePort
```
```shell script
vela addon enable velaux serviceType=NodePort
```
After specify the service type to `LoadBalancer` or `NodePort`, you can obtain the access address through `vela status`:
After the service type specified to `LoadBalancer` or `NodePort`, you can obtain the access address through `vela status`:
```
vela status addon-velaux -n vela-system --endpoint
```
The expected output:
```
+----------------------------+----------------------+
| REF(KIND/NAMESPACE/NAME) | ENDPOINT |
@ -64,12 +62,11 @@ The expected output:
If you have ingress and domain available in your cluster, you can also deploy VelaUX by specify a domain like below:
```shell script
```bash
vela addon enable velaux domain=example.doamin.com
```
The expected output:
```
I0112 15:23:40.428364 34884 apply.go:106] "patching object" name="addon-velaux" resource="core.oam.dev/v1beta1, Kind=Application"
I0112 15:23:40.676894 34884 apply.go:106] "patching object" name="addon-secret-velaux" resource="/v1, Kind=Secret"
@ -82,15 +79,28 @@ Please access the velaux from the following endpoints:
+----------------------------+---------------------------+
```
If you enabled the traefik addon, you can set the `gatewayDriver` parameter to use the Gateway API.
```shell script
vela addon enable velaux domain=example.doamin.com gatewayDriver=traefik
```
## Setup with MongoDB database
VelaUX supports the Kubernetes and MongoDB as the database. the default is Kubernetes. We strongly advise using the MongoDB database to power your production environment.
```shell script
vela addon enable velaux dbType=mongodb dbURL=mongodb://<MONGODB_USER>:<MONGODB_PASSWORD>@<MONGODB_URL>
```
## Specify the addon image
By default the image repo is docker hub, you can specify the image repo by the `repo` parameter:
By default the image repo is docker hub, you can specify the image repo by the `repo` parameter:
```
```shell script
vela addon enable velaux repo=acr.kubevela.net
```
But it has API request limit, so you can try specify the `acr.kubevela.net` image registry as alternative,
It's maintained by KubeVela team, we will upload/sync the built-in addon image for convenience.
You can try to specify the `acr.kubevela.net` image registry as an alternative, It's maintained by KubeVela team, and we will upload/sync the built-in addon image for convenience.
This feature can also help you to build your private installation, just upload all images to your private image registry.
This feature can also help you to build your private installation, just upload all images to your private image registry.

View File

@ -29,7 +29,7 @@ If you don't need the automation with root access, you can download from the [re
- ** MacOS/Linux **
```shell
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash -s 1.4.1
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash -s 1.4.2
```
- **Windows**

View File

@ -39,7 +39,7 @@ KubeVela CLI provides an easy to engage and manage your application delivery in
** MacOS/Linux **
```shell script
curl -fsSl https://kubevela.net/script/install.sh | bash -s 1.4.1
curl -fsSl https://kubevela.net/script/install.sh | bash -s 1.4.2
```
**Windows**
@ -112,7 +112,7 @@ Refer to [using Vela CLI docker image](./system-operation/vela-cli-image) for mo
<TabItem value="vela">
```shell script
$ vela install --version v1.4.1
$ vela install --version v1.4.2
```
<details> <summary> check out the outcome </summary>
@ -155,7 +155,7 @@ If you are helm user, you can also use helm to install kubevela core:
```
helm repo add kubevela https://charts.kubevela.net/core
helm repo update
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version 1.4.1 --wait
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version 1.4.2 --wait
```
</TabItem>
@ -185,7 +185,7 @@ Please refer to [VelaUX Guide](../reference/addons/velaux).
** MacOS/Linux **
```shell script
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.4.1
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.4.2
```
**Windows**
@ -246,13 +246,13 @@ docker pull oamdev/vela-cli:latest
> Please make sure you already upgraded the Vela CLI to 1.4.1.
```shell
vela install --version v1.4.1
vela install --version v1.4.2
```
### 3. Upgrade VelaUX
```shell
vela addon enable velaux version=v1.4.0
vela addon enable velaux version=v1.4.2
```
> If you set custom parameters during installation, be sure to include the corresponding parameters.

View File

@ -23,18 +23,18 @@ kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/release-1.4/
```
helm repo add kubevela https://charts.kubevela.net/core
helm repo update
helm upgrade -n vela-system --install kubevela kubevela/vela-core --version 1.4.1 --wait
helm upgrade -n vela-system --install kubevela kubevela/vela-core --version 1.4.2 --wait
```
3. Download and upgrade to the corresponding CLI
```
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.4.1
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.4.2
```
3. Upgrade VelaUX or other addon
```
vela addon upgrade velaux --version 1.4.0
vela addon upgrade velaux --version 1.4.2
```
Please note if you're using terraform addon, you should upgrade the `terraform` addon to version `1.0.6+` along with the vela-core upgrade, you can follow the following steps:

View File

@ -10,3 +10,5 @@ There's an community addon registry (https://addons.kubevela.net) maintained by
* [Machine Learning Addon](./ai): Machine learning addon is divided into model-training addon and model-serving addon.
* [Traefik](./traefik): Traefik is a modern HTTP reverse proxy and load balancer made to deploy microservices with ease.
* [Rollout](./rollout): Provide a capability rollout the applicaton.
* [Pyroscope](./pyroscope): Pyroscope is an open source platform, consisting of server and agent. It allows the user to collect, store, and query the profiling data in a CPU and disk efficient way.

View File

@ -0,0 +1,234 @@
---
title: Pyroscope
---
Pyroscope is an open source platform, consisting of server and agent. It allows the user to collect, store, and query the profiling data in a CPU and disk efficient way.
This addon is built based [Pyroscope](https://github.com/pyroscope-io/pyroscope)
## install
```shell
vela addon enable pyroscope
```
After enable pyroscope successfully, you can execute command to expose the port `4040` for Dashboard UI.
```shell
vela port-forward addon-pyroscope -n vela-system
```
## How to use pyroscope trait
Use a component typed webservice to start, keep the following to pyroscope-demo.yaml, then vela up -f app-demo.yaml
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: pyroscope-app
namespace: fourier
spec:
components:
- name: pyroscope-comp-01
type: webservice
properties:
image: nginx:latest
ports:
- expose: true
port: 80
protocol: TCP
imagePullPolicy: IfNotPresent
traits:
- type: pyroscope
properties:
server: "http://pyroscope-server:9084"
logger: "pyroscope.StandardLogger"
appName: "pyroscope-test"
- type: scaler
properties:
replicas: 1
```
And the parameter `appName` is a optional field, default value is the component name.
## How to use pyroscope client
### Pyroscope for Golang applications
- To start profiling a Go application, you need to include our go module in your app
```shell
# make sure you also upgrade pyroscope server to version 0.3.1 or higher
go get github.com/pyroscope-io/client/pyroscope
```
- Then add the following code to your application:
```go
package main
import "github.com/pyroscope-io/client/pyroscope"
func main() {
pyroscope.Start(pyroscope.Config{
ApplicationName: "simple.golang.app",
// replace this with the address of pyroscope server
ServerAddress: "http://pyroscope-server:4040",
// you can disable logging by setting this to nil
Logger: pyroscope.StandardLogger,
// optionally, if authentication is enabled, specify the API key:
// AuthToken: os.Getenv("PYROSCOPE_AUTH_TOKEN"),
// by default all profilers are enabled, but you can select the ones you want to use:
ProfileTypes: []pyroscope.ProfileType{
pyroscope.ProfileCPU,
pyroscope.ProfileAllocObjects,
pyroscope.ProfileAllocSpace,
pyroscope.ProfileInuseObjects,
pyroscope.ProfileInuseSpace,
},
})
// your code goes here
}
```
- Check out the [examples](https://github.com/pyroscope-io/pyroscope/tree/main/examples/golang-push) directory in our repository to learn more
### Pyroscope for Java applications
- Java integration is distributed as a single jar file: pyroscope.jar. It contains native async-profiler libraries
- To start profiling a Java application, run your application with pyroscope.jar javaagent:
```shell
export PYROSCOPE_APPLICATION_NAME=my.java.app
export PYROSCOPE_SERVER_ADDRESS=http://pyroscope-server:4040
# Optionally, if authentication is enabled, specify the API key.
# export PYROSCOPE_AUTH_TOKEN={YOUR_API_KEY}
java -javaagent:pyroscope.jar -jar app.jar
```
- Check out the [examples](https://github.com/pyroscope-io/pyroscope/tree/main/examples/java) folder in our repository to learn more
### Pyroscope for .net applications
- To start profiling a .NET application inside a container, you may wrap your application with pyroscope exec as an entrypoint of your image. The tricky part is that you need to copy pyroscope binary to your docker container. To do that, use COPY --from command in your Dockerfile.
The following example Dockerfile shows how to build the image:
```dockerfile
FROM mcr.microsoft.com/dotnet/sdk:5.0
WORKDIR /dotnet
COPY --from=pyroscope/pyroscope:latest /usr/bin/pyroscope /usr/bin/pyroscope
ADD my-app .
RUN dotnet publish -o . -r $(dotnet --info | grep RID | cut -b 6- | tr -d ' ')
# optionally you may set the pyroscope server address as well as the app name and other configuration options.
ENV PYROSCOPE_SERVER_ADDRESS=http://pyroscope-server:4040
ENV PYROSCOPE_APPLICATION_NAME=my.dotnet.app
ENV PYROSCOPE_LOG_LEVEL=debug
CMD ["pyroscope", "exec", "dotnet", "/dotnet/my-app.dll"]
```
- If you are using Docker Compose, you can run both pyroscope server and agent with this configuration:
```yaml
---
version: "3.9"
services:
pyroscope-server:
image: "pyroscope/pyroscope:latest"
ports:
- "4040:4040"
command:
- "server"
app:
image: "my-app:latest"
environment:
PYROSCOPE_APPLICATION_NAME: my.dotnet.app
PYROSCOPE_SERVER_ADDRESS: http://pyroscope-server:4040
PYROSCOPE_LOG_LEVEL: debug
ASPNETCORE_URLS: http://*:5000
ports:
- "5000:5000"
cap_add:
- SYS_PTRACE
```
- Check out the [examples](https://github.com/pyroscope-io/pyroscope/tree/main/examples/dotnet) folder in our repository to learn more
### Pyroscope for Python applications
- First, install pyroscope-io pip package:
```shell
pip install pyroscope-io
```
- Add the following code to your application. This code will initialize pyroscope profiler and start profiling:
```shell
import pyroscope
pyroscope.configure(
app_name = "my.python.app", # replace this with some name for your application
server_address = "http://my-pyroscope-server:4040", # replace this with the address of your pyroscope server
# auth_token = "{YOUR_API_KEY}", # optionally, if authentication is enabled, specify the API key
)
```
- Check out the [example python project in pyroscope repository](https://github.com/pyroscope-io/pyroscope/tree/main/examples/python) for examples of how you can use these features.
### Pyroscope for PHP applications
- To start profiling a PHP application in a container, you may wrap your application with pyroscope exec as an entrypoint of your image. The tricky part is that you need to copy pyroscope binary to your docker container. To do that, use COPY --from command in your Dockerfile.
The following example Dockerfile shows how to build the image:
```dockerfile
FROM php:7.3.27
WORKDIR /var/www/html
# this copies pyroscope binary from pyroscope image to your image:
COPY --from=pyroscope/pyroscope:latest /usr/bin/pyroscope /usr/bin/pyroscope
COPY main.php ./main.php
# optionally you may set the pyroscope server address as well as the app name, make sure you change these:
ENV PYROSCOPE_APPLICATION_NAME=my.php.app
ENV PYROSCOPE_SERVER_ADDRESS=http://pyroscope:4040/
# this starts your app with pyroscope profiler, make sure to change "php" and "main.php" to the actual command.
CMD ["pyroscope", "exec", "php", "main.php"]
```
- If you are using Docker Compose, you can run both pyroscope server and agent with this configuration:
```yaml
---
services:
pyroscope-server:
image: "pyroscope/pyroscope:latest"
ports:
- "4040:4040"
command:
- "server"
app:
image: "my-app:latest"
env:
PYROSCOPE_SERVER_ADDRESS: http://pyroscope-server:4040
PYROSCOPE_APPLICATION_NAME: my.php.app
cap_add:
- SYS_PTRACE
```
- Check out the [examples](https://github.com/pyroscope-io/pyroscope/tree/main/examples/php) folder in our repository to learn more
### Pyroscope for NodeJS applications
- To start profiling a NodeJS application, you need to include the npm module in your app:
```shell
npm install @pyroscope/nodejs
# or
yarn add @pyroscope/nodejs
```
- Then add the following code to your application:
```js
const Pyroscope = require('@pyroscope/nodejs');
Pyroscope.init({
serverAddress: 'http://pyroscope:4040',
appName: 'myNodeService'
});
Pyroscope.start()
```
- Check out the [examples](https://github.com/pyroscope-io/pyroscope/tree/main/examples/nodejs) directory in our repository to learn more
## uninstall
```shell
vela addon disable pyroscope
```

View File

@ -5,7 +5,7 @@ title: VelaUX
## Install
```shell script
vela addon enable velaux
vela addon enable velaux --version=v1.4.2
```
expected output:
@ -13,7 +13,7 @@ expected output:
Addon: velaux enabled Successfully.
```
VelaUX need authentication. Default username is `admin` and the password is `VelaUX12345`. Please must set and remember the new password after the first login.
VelaUX needs authentication. The default username is `admin` and the password is `VelaUX12345`. Please must set and remember the new password after the first login.
By default, VelaUX didn't have any exposed port.
@ -30,9 +30,10 @@ Choose `> Cluster: local | Namespace: vela-system | Component: velaux | Kind: Se
## Setup with Specified Service Type
There are three service types for VelaUX addon which aligned with Kubernetes service, they're `ClusterIP`, `NodePort` and `LoadBalancer`.
By default the service type is ClusterIP for security.
If you want to expose your VelaUX dashboard for convenient, you can specify the service type.
If you want to expose your VelaUX dashboard for convenience, you can specify the service type.
- `LoadBalancer` type requires your cluster has cloud LoadBalancer available.
```shell script
@ -43,7 +44,7 @@ If you want to expose your VelaUX dashboard for convenient, you can specify the
vela addon enable velaux serviceType=NodePort
```
After specify the service type to `LoadBalancer` or `NodePort`, you can obtain the access address through `vela status`:
After the service type specified to `LoadBalancer` or `NodePort`, you can obtain the access address through `vela status`:
```
vela status addon-velaux -n vela-system --endpoint
@ -62,7 +63,7 @@ The expected output:
If you have ingress and domain available in your cluster, you can also deploy VelaUX by specify a domain like below:
```shell script
```bash
vela addon enable velaux domain=example.doamin.com
```
@ -82,7 +83,15 @@ Please access the velaux from the following endpoints:
If you enabled the traefik addon, you can set the `gatewayDriver` parameter to use the Gateway API.
```shell script
$ vela addon enable velaux domain=example.doamin.com gatewayDriver=traefik
vela addon enable velaux domain=example.doamin.com gatewayDriver=traefik
```
## Setup with MongoDB database
VelaUX supports the Kubernetes and MongoDB as the database. the default is Kubernetes. We strongly advise using the MongoDB database to power your production environment.
```shell script
vela addon enable velaux dbType=mongodb dbURL=mongodb://<MONGODB_USER>:<MONGODB_PASSWORD>@<MONGODB_URL>
```
## Specify the addon image
@ -93,7 +102,6 @@ By default the image repo is docker hub, you can specify the image repo by the `
vela addon enable velaux repo=acr.kubevela.net
```
But it has API request limit, so you can try specify the `acr.kubevela.net` image registry as alternative,
It's maintained by KubeVela team, we will upload/sync the built-in addon image for convenience.
You can try to specify the `acr.kubevela.net` image registry as an alternative, It's maintained by KubeVela team, and we will upload/sync the built-in addon image for convenience.
This feature can also help you to build your private installation, just upload all images to your private image registry.