adrianco / spigo

Simulate Protocol Interactions in Go
Apache License 2.0
1.12k stars 111 forks source link

Question: how to visualise my own arch? #56

Open jasw opened 9 years ago

jasw commented 9 years ago

Hi all,

Same with many others, Adrian's great talk on State of Arts Microservices brought me here.

I am having my first go at Simianviz. Just created my own json arch by using the provided script to convert my docker compose file (name:"frontier_arch.json"). I can see now in the json_arch folder:


tree json_arch   
json_arch
├── aws_ac_ra_web_arch.json
├── cassandra_arch.json
├── container_arch.json
├── frontier_arch.json
├── lamp_arch.json
├── netflix_arch.json
├── netflixoss_arch.json
├── test_arch.json
├── testyaml_arch.json
└── yogi_arch.json

I can see I could run spigo to simulate some load:

/spigo -a frontier -d 5 -j -g                     
2015/10/21 13:17:12 Loading architecture from json_arch/frontier_arch.json
2015/10/21 13:17:12 frontier.edda: starting
2015/10/21 13:17:12 Architecture: /Users/jasonw/java/projects/vagrant-docker-jenkins-frontier/frontier_sharefolder/docker-files/frontier-compose/docker-compose.yml compose yaml
2015/10/21 13:17:12 architecture: scaling to 100%
2015/10/21 13:17:12 Starting: {mysql1 machine instance frontier-mysql process monolith 1 3 []}
2015/10/21 13:17:12 frontier.us-east-1.zoneA.eureka0....eureka.eureka: starting
2015/10/21 13:17:12 frontier.us-east-1.zoneB.eureka1....eureka.eureka: starting
2015/10/21 13:17:12 frontier.us-east-1.zoneC.eureka2....eureka.eureka: starting
2015/10/21 13:17:12 Starting: {frontier_java_app_1 machine instance frontier-java-app process monolith 1 3 [mysql1]}
2015/10/21 13:17:12 Starting: {frontier_java_app_2 machine instance frontier-java-app process monolith 1 3 [mysql1]}
2015/10/21 13:17:12 Starting: {haproxy1 machine instance frontier-haproxy process monolith 1 3 [frontier_java_app_1 frontier_java_app_2]}
2015/10/21 13:17:12 frontier.us-east-1.zoneC.haproxy12....haproxy1.monolith activity rate  10ms
2015/10/21 13:17:17 asgard: Shutdown
2015/10/21 13:17:17 frontier.us-east-1.zoneC.eureka2....eureka.eureka: closing
2015/10/21 13:17:17 frontier.us-east-1.zoneA.eureka0....eureka.eureka: closing
2015/10/21 13:17:17 frontier.us-east-1.zoneB.eureka1....eureka.eureka: closing
2015/10/21 13:17:17 spigo: complete
2015/10/21 13:17:17 frontier.edda: closing

I started the server using npm run dev

I assumed my architecture diagram would show up along with the 'lamp', 'netflix' ones in the dropdown but couldn't find it.

Am I missing something?

Another question is, when I am generating load using Spigo commandline, should I be expecting visual changes on the d3 diagrams? Or the 'charge' on the page meant to be for that?

Many thanks,

Jason

adrianco commented 8 years ago

To add a new arch to the menu you need to edit the menu in the UI at the end of this file https://github.com/adrianco/spigo/blob/master/ui/js/toolbar/index.js

Sorry I didn't see this question earlier.

Spigo commandline saves files that the UI loads later. Charge pushes the nodes apart in the UI.