-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #600 from Dataman-Cloud/v1.0.6
V1.0.6
- Loading branch information
Showing
11 changed files
with
512 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Deploy guide | ||
============= | ||
|
||
## 国内 | ||
|
||
1. 请确保docker安装版本 >=1.12, 并确保docker正常运行.(如何安装和配置docker请参考https://docs.docker.com/engine/installation/) | ||
2. 请确保docker-compose已经正确安装.(如何安装docker-compose请参考https://docs.docker.com/compose/install/) | ||
3. 启动环境 `CRANE_IP=X.X.X.X VERSION=v1.0.6 ./deploy.sh` | ||
4. 安装成功后通过浏览器访问 http://$IP 即可,默认用户名:[email protected] 密码:adminadmin | ||
|
||
## Others | ||
|
||
1. docker>=1.12 [how to install](https://docs.docker.com/engine/installation/) | ||
2. docker-compose>=1.8.0 [how to install](https://docs.docker.com/compose/install/) | ||
3. Enable the Docker tcp Socket on port: 2375 [how to config](https://docs.docker.com/engine/reference/commandline/dockerd/#/daemon-socket-option) | ||
4. Start ntp service | ||
5. You'd better `setenforce 0` | ||
6. `CRANE_IP=X.X.X.X VERSION=v1.0.6 REGISTRY_PREFIX=2breakfast/ ./deploy.sh` | ||
7. Browser http://$CRANE_IP | ||
|
||
* username: `[email protected]` | ||
* password: `adminadmin` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
export CRANE_SWARM_MANAGER_IP=$CRANE_IP | ||
export TAG=${VERSION:-1.0} | ||
export REGISTRY_PREFIX=${REGISTRY_PREFIX:-catalog.shurenyun.com/library/} | ||
|
||
# node env check | ||
echo "Checking the node status" | ||
./node-init.sh || exit 1 | ||
|
||
# swarm init | ||
echo "Trying to init swarm cluster" | ||
INIT_ERROR=$(docker swarm init --advertise-addr=$CRANE_IP 2>&1 > /dev/null) || { | ||
docker info 2>/dev/null | grep Swarm | grep -v inactive || { | ||
printf "\033[41mERROR:\033[0m failed to init swarm against cmd: \e[1;34mdocker swarm init --advertise-addr=$CRANE_IP\e[0m\n" | ||
echo "$INIT_ERROR" | ||
exit 1 | ||
} | ||
} | ||
echo "Swarm cluster have been running!" | ||
|
||
docker-compose -p crane up -d | ||
|
||
# feedback the activities | ||
curl -XPOST 123.59.58.58:4500/activities -H "Content-Type: application/json" -d'{"UniqId": "'"$(hostname)"'"}' &>/dev/null || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
version: "2" | ||
services: | ||
blackmamba: | ||
image: ${REGISTRY_PREFIX}blackmamba:${TAG} | ||
ports: | ||
- "80:80" | ||
volumes: | ||
- /etc/localtime:/etc/localtime | ||
links: | ||
- crane | ||
restart: always | ||
crane_registry: | ||
image: ${REGISTRY_PREFIX}registry:crane${TAG} | ||
ports: | ||
- "5000:5000" | ||
- "5001:5001" | ||
environment: | ||
- CRANE_IP | ||
volumes: | ||
- ./registry_storage:/storage | ||
- /etc/localtime:/etc/localtime | ||
restart: always | ||
crane: | ||
image: ${REGISTRY_PREFIX}crane:${TAG} | ||
env_file: | ||
- ./env | ||
links: | ||
- crane_registry | ||
- crane_db | ||
volumes: | ||
- /etc/localtime:/etc/localtime | ||
ports: | ||
- "5013:5013" | ||
restart: always | ||
crane_db: | ||
image: ${REGISTRY_PREFIX}mysql:crane${TAG} | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=111111 | ||
volumes: | ||
- ./mysql_storage:/var/lib/mysql | ||
- /etc/localtime:/etc/localtime | ||
restart: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
CRANE_ADDR=0.0.0.0:5013 | ||
CRANE_SWARM_MANAGER_IP | ||
CRANE_DOCKER_TLS_VERIFY=false | ||
CRANE_DOCKER_ENTRY_PORT=2375 | ||
CRANE_DOCKER_API_VERSION=1.24 | ||
CRANE_DOCKER_CERT_PATH=null | ||
|
||
CRANE_DB_DSN=root:111111@tcp(crane_db:3306)/crane?charset=utf8&parseTime=true&loc=Local | ||
CRANE_DB_DRIVER=mysql | ||
|
||
CRANE_FEATURE_FLAGS=registry,account,catalog,search,registryauth | ||
|
||
CRANE_REGISTRY_PRIVATE_KEY_PATH=./private_key.pem | ||
CRANE_REGISTRY_ADDR=http://crane_registry:5000 | ||
|
||
CRANE_ACCOUNT_TOKEN_STORE=default | ||
CRANE_ACCOUNT_AUTHENTICATOR=default | ||
[email protected] | ||
CRANE_ACCOUNT_PASSWORD_DEFAULT=adminadmin | ||
|
||
CRANE_SEARCH_LOAD_DATA_INTERVAL=1 |
Oops, something went wrong.