Skip to content
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

Feature/wip/new service description format #21

Merged
Show file tree
Hide file tree
Changes from 14 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
10 changes: 10 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 10 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
# Build and upload Docker images
Build docker images for main application and worker
Build docker image for main application
1. Under [model](/model) directory, run:
``` bash
docker build -t redis-demo .
```
2. Under [worker](/worker) directory, run:
```bash
docker build -t redis-demo-worker .
docker build -t app-demo .
```

After creating the docker images, upload them to each of the clusters 'i' by runnning:
``` bash
kind load docker-image redis-demo --name={cluster$i}
kind load docker-image redis-demo-worker --name={cluster$i}
kind load docker-image app-demo --name={cluster$i}
```

## Dependecies
Expand All @@ -23,42 +18,24 @@ kind load docker-image redis-demo-worker --name={cluster$i}
5. go (for installation, configuration and basic testing, follow instructions in e.g. [How to Install GoLang (Go Programming Language) in Linux](HTtps://www.tecmint.com/install-go-in-linux/); make sure go environment variables and path are configured accordingly)

## Environment Preparation
1. Make sure there exist a kubernetes namespace with name edge-namespace with Istio sidecar injection enabled
2. Make sure the application-generator folder is located under path ~/go_projects/src/ and initialize module by executing go mod init
3. If needed, install go module dependencies, e.g. cobra and yaml
4. Deploy InfluxDB by running startup.sh script and providing no of clusters as argument
```bash
./startup.sh {$no_of_clusters}
```
5. Modify any of the service chain files under the chain directory according to the requirements.
6. Modify any of the cluster placement files under the clusters directory according to the requirements.
7. Generate and deploy kubernetes manifest files by running 'generator.sh' script. It accepts three arguments, path to chain file, path to cluster file and value for readiness probe in seconds.
1. Make sure the application-generator folder is located under path ~/go_projects/src/ and initialize module by executing go mod init
2. If needed, install go module dependencies, e.g. cobra and yaml
3. Modify any of the input files under the input directory according to the requirements.
4. Generate and deploy kubernetes manifest files by running 'generator.sh' script. It accepts three arguments, path to chain file, path to cluster file and value for readiness probe in seconds.
salehsedghpour marked this conversation as resolved.
Show resolved Hide resolved
```bash
./generator.sh {chain file} {cluster file} {readiness probe}
./generator.sh {input file} {readiness probe}
```
8. Modify the necessary files for request generator
5. Modify the necessary files for request generator
- Change the initial field of json files under the **tsung** directory according the chain configuration.
- Change the chain_no field of json files under the **tsung** directory according the chain configuration. For example, for first chain it should be **1**
- Update the request_task_type of json files under the **tsung** directory for assigning user defined task to each microservice in the chain
- Change server host ip address in conf.xml file with istio-ingress gateway for first microservice in chain.
- Change the chain json file under the request section in conf.xml to send request to the desired chain. For example, if first chain is targeted it should be **chain1.json**
9. Change Kubernetes context to the main cluster
6. Change Kubernetes context to the main cluster
```bash
kubectl config use-context cluster1
```
10. Open the istioctl grafana dashboard, and add custom data source for InfluxDB
```bash
istioctl dashboard grafana
```
- Configure data source for InfluxDB as the following:
- Name: influxdb
- URL: http://influxdb.default.svc.cluster.local:8086
- Database: latency
- User: root
- Password: root
- Add custom dashboard by importing the json file under the **grafana folder**.
## Running
Note: Make sure there exist an Istio gateway and virtual service for the frontend service(s). For an example see under folder ./frontend/
After configuring environment correctly, you can just use the following command the start request generator.
```bash
tsung -f tsung/conf.xml -k start
Expand Down
129 changes: 0 additions & 129 deletions generator/chains/chain100_3.json

This file was deleted.

44 changes: 0 additions & 44 deletions generator/chains/chain10_3.json

This file was deleted.

67 changes: 0 additions & 67 deletions generator/chains/chain10_5.json

This file was deleted.

57 changes: 0 additions & 57 deletions generator/chains/chain20_3.json

This file was deleted.

Loading