Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmet.olgac committed May 13, 2020
1 parent 8619a36 commit 86b8b96
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# skywalking-docker-compose
skywalking-docker-compose

./start.sh to deploy skaywalking stack,

./stop.sh to remove skaywalking stack
24 changes: 24 additions & 0 deletions es7/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: "3.7"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.7.0
ports:
- 9200:9200
networks:
- sky
environment:
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms2g -Xmx2g
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
deploy:
resources:
limits:
memory: 4G

networks:
sky:
external: true

volumes:
elasticsearch-data:
16 changes: 16 additions & 0 deletions oap/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "3.7"
services:
oap:
image: apache/skywalking-oap-server:7.0.0-es7
ports:
- 11800:11800
- 12800:12800
networks:
- sky
environment:
SW_STORAGE: elasticsearch7
SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200

networks:
sky:
external: true
15 changes: 15 additions & 0 deletions portainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: "3.7"
services:
portainer:
image: portainer/portainer:1.23.2
command: --tlsskipverify --admin-password "$$2y$$05$$9RxsK6QLTJGLRgzwpeITvOVVqhVAXDSM0PKZ70Lx/Wte5JVKUztIW" #qwe12345
ports:
- 9000:9000
networks:
- sky
volumes:
- /var/run/docker.sock:/var/run/docker.sock

networks:
sky:
external: true
36 changes: 36 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

ROOT_PATH=$(dirname "$0")

echo "$(date) initializing swarm mode"
docker swarm init 2>/dev/null

echo "$(date) creating overlay network sky"
docker network create --driver=overlay --attachable sky && sleep 3

echo "$(date) pulling portainer 1.23.2 image"
docker pull portainer/portainer:1.23.2

echo "$(date) deploying portainer v1.23.2 [admin:qwe12345]"
docker stack deploy -c $ROOT_PATH/portainer/docker-compose.yml sky

echo "$(date) pulling elasticsearch v7.7.0 image"
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.7.0

echo "$(date) deploying elasticsearch v7.7.0"
docker stack deploy -c $ROOT_PATH/es7/docker-compose.yml sky
while true; do curl -XGET http://localhost:9200 2>/dev/null; if [ $? -eq 0 ]; then echo -e "\n$(date) elasticsearch v7.7.0 is READY!"; break; fi; printf "."; sleep 1; done

echo "$(date) pulling oap-server v7.0.0-es7 image"
docker pull apache/skywalking-oap-server:7.0.0-es7

echo "$(date) deploying oap-server v7.0.0-es7"
docker stack deploy -c $ROOT_PATH/oap/docker-compose.yml sky
while true; do curl -XGET http://localhost:12800 2>/dev/null; if [ $? -eq 0 ]; then echo -e "\n$(date) oap-server v7.0.0-es7 is READY!"; break; fi; printf "."; sleep 1; done

echo "$(date) pulling ui v7.0.0 image"
docker pull apache/skywalking-ui:7.0.0

echo "$(date) deploying ui v7.0.0"
docker stack deploy -c $ROOT_PATH/ui/docker-compose.yml sky
while true; do curl -XGET http://localhost:8080 2>/dev/null; if [ $? -eq 0 ]; then echo -e "\n$(date) ui v7.0.0 is READY!"; break; fi; printf "."; sleep 1; done
12 changes: 12 additions & 0 deletions stop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

ROOT_PATH=$(dirname "$0")

echo "$(date) removing sky stack"
docker stack rm sky

echo "$(date) removing sky network"
docker network rm sky

echo "$(date) pruning death containers"
docker container prune -f
14 changes: 14 additions & 0 deletions ui/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "3.7"
services:
ui:
image: apache/skywalking-ui:7.0.0
ports:
- 8080:8080
networks:
- sky
environment:
SW_OAP_ADDRESS: oap:12800

networks:
sky:
external: true

0 comments on commit 86b8b96

Please sign in to comment.