Skip to content

Commit

Permalink
Merge bf05ce4 into 15d9ce8
Browse files Browse the repository at this point in the history
  • Loading branch information
asifdxtreme committed Feb 24, 2018
2 parents 15d9ce8 + bf05ce4 commit e171eac
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 68 deletions.
40 changes: 32 additions & 8 deletions README.md
@@ -1,4 +1,4 @@
# service-center
# Apache-Incubator-ServiceComb-Service-Center
[![Build Status](https://www.travis-ci.org/apache/incubator-servicecomb-service-center.svg?branch=master)](https://www.travis-ci.org/apache/incubator-servicecomb-service-center) [![Coverage Status](https://coveralls.io/repos/github/apache/incubator-servicecomb-service-center/badge.svg?branch=master)](https://coveralls.io/github/apache/incubator-servicecomb-service-center?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/apache/incubator-servicecomb-service-center)](https://goreportcard.com/report/github.com/apache/incubator-servicecomb-service-center) [![GoDoc](https://godoc.org/github.com/apache/incubator-servicecomb-service-center?status.svg)](https://godoc.org/github.com/apache/incubator-servicecomb-service-center)

Apache ServiceComb (incubating) service-center allows services to register their instance information and to discover providers of a given service.
Expand All @@ -21,20 +21,20 @@ Apache ServiceComb (incubating) service-center allows services to register their

### Getting Service Center

The easiest way to get Service Center is to use one of the pre-built release binaries which are available for Linux, Windows and Docker. Instructions for using these binaries are on the [GitHub releases page][github-release].
The easiest way to get Service Center is to use one of the pre-built release binaries which are available for Linux, Windows and Docker.

[github-release]: https://github.com/servicecomb/service-center/releases/
[github-release]: http://servicecomb.incubator.apache.org/

### Building and Running Service Center
### Running Service Center using the Release

You don't need to build from source to use Service Center (binaries on the [GitHub releases page][github-release]).When you get these binaries, you can execute the start script to run Service Center.
You can download our latest release from [ServiceComb Website][github-release]).When you get these release, you can execute the start script to run Service Center.

Windows(service-center-xxx-windows-amd64.zip):
Windows(apache-incubator-servicecomb-service-center-XXX-windows-amd64.zip):
```
start.bat
```

Linux(service-center-xxx-linux-amd64.tar.gz):
Linux(apache-incubator-servicecomb-service-center-XXXX-linux-amd64.tar.gz):
```sh
./start.sh
```
Expand All @@ -44,8 +44,32 @@ docker pull servicecomb/service-center
docker run -d -p 30100:30100 servicecomb/service-center
```

Note: The Releases of Service-Center uses emebeded etcd, if you want to use the seperate instance of etcd then you can deploy the etcd seperately and configure the etcd ip over here.
```
vi conf/app.conf
## Edit this file
# registry address
# 1. if registry_plugin equals to 'embeded_etcd'
# manager_name = "sc-0"
# manager_addr = "http://127.0.0.1:2380"
# manager_cluster = "sc-0=http://127.0.0.1:2380"
# 2. if registry_plugin equals to 'etcd'
# manager_cluster = "127.0.0.1:2379"
manager_cluster = "127.0.0.1:2379"
```

By default the SC comes up on 127.0.0.1:30100, however you can change the configuration of these address over here.

```
vi conf/app.conf
httpaddr = 127.0.0.1
httpport = 30100
```


##### If you want to try out the latest and greatest, Service Center can be easily built.
### Building & Running Service-Center from source

Download the Code
```sh
Expand Down
18 changes: 14 additions & 4 deletions frontend/Readme.md
@@ -1,19 +1,29 @@
## Service-Center UI
## Apache-Incubator-ServiceComb-Service-Center-Frontend

Service-Center UI enables user to view the list of MicroServices registered in SC. Users can view the detailed information of their MicroServices, Instances and Schemas.
Service-Center UI also offers a unique feature of testing the Schemas of their MicroServices from UI, Users can also download the html client for their Schemas.

### QuickStart Guide

Easiest way to get started with Service-Center UI is to download the release from [here](https://github.com/ServiceComb/service-center/releases) and then untar/unzip it based on your OS and run start.sh/start.bat.
Easiest way to get started with Service-Center UI is to download the release from [here](https://dist.apache.org/repos/dist/dev/incubator/servicecomb/incubator-servicecomb-service-center/) and then untar/unzip it based on your OS and run start.sh/start.bat.
This will bring up the Service-Center UI on [http://127.0.0.1:30103](http://127.0.0.1:30103).

Windows(apache-incubator-servicecomb-frontend-service-center-XXX-windows-amd64.zip):
```
start.bat
```

Linux(apache-incubator-servicecomb-frontend-service-center-XXXX-linux-amd64.tar.gz):
```sh
./start.sh
```

##### Running UI from source code
However if you want to try our latest code then you can follow the below steps
```
#Make sure your GOPATH is set correctly as the UI runs on GO Backend Server
git clone https://github.com/ServiceComb/service-center.git $GOPATH/src/github.com/ServiceComb/service-center
cd $GOPATH/src/github.com/ServiceComb/service-center
git clone https://github.com/apache/incubator-servicecomb-service-center.git $GOPATH/src/github.com/apache/incubator-servicecomb-service-center
cd $GOPATH/src/github.com/apache/incubator-servicecomb-service-center
cd frontend
go run main.go
Expand Down
58 changes: 29 additions & 29 deletions scripts/release/make_frontend_release.sh
Expand Up @@ -65,29 +65,29 @@ build_linux(){
fi

set +e
rm -rf frontend-servicecomb-service-center-$PACKAGE-linux-amd64
rm -rf frontend-servicecomb-service-center-$PACKAGE-linux-amd64.tar.gz
rm -rf apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64
rm -rf apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64.tar.gz

set -e
mkdir -p frontend-servicecomb-service-center-$PACKAGE-linux-amd64
mkdir -p apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64

export GOOS=linux
cd frontend
go build -o scfrontend
cp -r scfrontend ../frontend-servicecomb-service-center-$PACKAGE-linux-amd64
go build -o apache-incubator-serviceomb-frontend
cp -r apache-incubator-serviceomb-frontend ../apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64
cd ..
prepare_conf
cp -r tmp/conf frontend-servicecomb-service-center-$PACKAGE-linux-amd64/
cp -r frontend/app frontend-servicecomb-service-center-$PACKAGE-linux-amd64/
echo "./scfrontend > start-sc-frontend.log 2>&1 &" >> frontend-servicecomb-service-center-$PACKAGE-linux-amd64/start.sh
echo "kill -9 \$(ps aux | grep 'scfrontend' | awk '{print \$2}')" >> frontend-servicecomb-service-center-$PACKAGE-linux-amd64/stop.sh
chmod +x frontend-servicecomb-service-center-$PACKAGE-linux-amd64/start.sh
chmod +x frontend-servicecomb-service-center-$PACKAGE-linux-amd64/stop.sh
cp -r LICENSE frontend-servicecomb-service-center-$PACKAGE-linux-amd64/
cp -r NOTICE frontend-servicecomb-service-center-$PACKAGE-linux-amd64/
cp -r DISCLAIMER frontend-servicecomb-service-center-$PACKAGE-linux-amd64/
cp -r frontend/Readme.md frontend-servicecomb-service-center-$PACKAGE-linux-amd64/
tar -czvf frontend-servicecomb-service-center-$PACKAGE-linux-amd64.tar.gz frontend-servicecomb-service-center-$PACKAGE-linux-amd64
cp -r tmp/conf apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64/
cp -r frontend/app apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64/
echo "./apache-incubator-serviceomb-frontend > start-sc-frontend.log 2>&1 &" >> apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64/start.sh
echo "kill -9 \$(ps aux | grep 'apache-incubator-serviceomb-frontend' | awk '{print \$2}')" >> apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64/stop.sh
chmod +x apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64/start.sh
chmod +x apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64/stop.sh
cp -r LICENSE apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64/
cp -r NOTICE apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64/
cp -r DISCLAIMER apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64/
cp -r frontend/Readme.md apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64/
tar -czvf apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64.tar.gz apache-incubator-servicecomb-frontend-service-center-$PACKAGE-linux-amd64

}

Expand All @@ -101,25 +101,25 @@ build_windows(){
fi

set +e
rm -rf frontend-servicecomb-service-center-$PACKAGE-windows-amd64
rm -rf frontend-servicecomb-service-center-$PACKAGE-windows-amd64.zip
rm -rf apache-incubator-servicecomb-frontend-service-center-$PACKAGE-windows-amd64
rm -rf apache-incubator-servicecomb-frontend-service-center-$PACKAGE-windows-amd64.zip

set -e
mkdir -p frontend-servicecomb-service-center-$PACKAGE-windows-amd64
mkdir -p apache-incubator-servicecomb-frontend-service-center-$PACKAGE-windows-amd64
export GOOS=windows
cd frontend
go build -o scfrontend.exe
cp -r scfrontend.exe ../frontend-servicecomb-service-center-$PACKAGE-windows-amd64
go build -o apache-incubator-serviceomb-frontend.exe
cp -r apache-incubator-serviceomb-frontend.exe ../apache-incubator-servicecomb-frontend-service-center-$PACKAGE-windows-amd64
cd ..
prepare_conf
cp -r tmp/conf frontend-servicecomb-service-center-$PACKAGE-windows-amd64/
cp -r frontend/app frontend-servicecomb-service-center-$PACKAGE-windows-amd64/
cp -r LICENSE frontend-servicecomb-service-center-$PACKAGE-windows-amd64/
cp -r NOTICE frontend-servicecomb-service-center-$PACKAGE-windows-amd64/
cp -r DISCLAIMER frontend-servicecomb-service-center-$PACKAGE-windows-amd64/
cp -r frontend/Readme.md frontend-servicecomb-service-center-$PACKAGE-windows-amd64/
echo "scfrontend.exe" >> frontend-servicecomb-service-center-$PACKAGE-windows-amd64/start.bat
tar -czvf frontend-servicecomb-service-center-$PACKAGE-windows-amd64.tar.gz frontend-servicecomb-service-center-$PACKAGE-windows-amd64
cp -r tmp/conf apache-incubator-servicecomb-frontend-service-center-$PACKAGE-windows-amd64/
cp -r frontend/app apache-incubator-servicecomb-frontend-service-center-$PACKAGE-windows-amd64/
cp -r LICENSE apache-incubator-servicecomb-frontend-service-center-$PACKAGE-windows-amd64/
cp -r NOTICE apache-incubator-servicecomb-frontend-service-center-$PACKAGE-windows-amd64/
cp -r DISCLAIMER apache-incubator-servicecomb-frontend-service-center-$PACKAGE-windows-amd64/
cp -r frontend/Readme.md apache-incubator-servicecomb-frontend-service-center-$PACKAGE-windows-amd64/
echo "apache-incubator-serviceomb-frontend.exe" >> apache-incubator-servicecomb-frontend-service-center-$PACKAGE-windows-amd64/start.bat
tar -czvf apache-incubator-servicecomb-frontend-service-center-$PACKAGE-windows-amd64.tar.gz apache-incubator-servicecomb-frontend-service-center-$PACKAGE-windows-amd64
}

## Compile the binary
Expand Down
54 changes: 27 additions & 27 deletions scripts/release/make_release.sh
Expand Up @@ -71,30 +71,30 @@ build_linux(){
fi

set +e
rm -rf servicecomb-service-center-$PACKAGE-linux-amd64
rm -rf servicecomb-service-center-$PACKAGE-linux-amd64.tar.gz
rm -rf apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64
rm -rf apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64.tar.gz

set -e
mkdir -p servicecomb-service-center-$PACKAGE-linux-amd64
mkdir -p apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64

export GOOS=linux
export GIT_COMMIT=$(git log --pretty=format:'%h' -n 1)
export BUILD_NUMBER=$RELEASE
GO_LDFLAGS="${GO_LDFLAGS} -X 'github.com/apache/incubator-servicecomb-service-center/version.BUILD_TAG=$(date +%Y%m%d%H%M%S).$BUILD_NUMBER.$GIT_COMMIT'"
GO_LDFLAGS="${GO_LDFLAGS} -X 'github.com/apache/incubator-servicecomb-service-center/version.VERSION=$BUILD_NUMBER'"
go build --ldflags "${GO_LDFLAGS}"
cp -r incubator-servicecomb-service-center servicecomb-service-center-$PACKAGE-linux-amd64
go build --ldflags "${GO_LDFLAGS}" -o apache-incubator-servicecomb-service-center
cp -r apache-incubator-servicecomb-service-center apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64
prepare_conf
cp -r tmp/conf servicecomb-service-center-$PACKAGE-linux-amd64/
echo "./incubator-servicecomb-service-center > start-sc.log 2>&1 &" >> servicecomb-service-center-$PACKAGE-linux-amd64/start.sh
echo "kill -9 \$(ps aux | grep 'incubator-servicecomb-service-center' | awk '{print \$2}')" >> servicecomb-service-center-$PACKAGE-linux-amd64/stop.sh
chmod +x servicecomb-service-center-$PACKAGE-linux-amd64/start.sh
chmod +x servicecomb-service-center-$PACKAGE-linux-amd64/stop.sh
cp -r LICENSE servicecomb-service-center-$PACKAGE-linux-amd64/
cp -r NOTICE servicecomb-service-center-$PACKAGE-linux-amd64/
cp -r DISCLAIMER servicecomb-service-center-$PACKAGE-linux-amd64/
cp -r README.md servicecomb-service-center-$PACKAGE-linux-amd64/
tar -czvf servicecomb-service-center-$PACKAGE-linux-amd64.tar.gz servicecomb-service-center-$PACKAGE-linux-amd64
cp -r tmp/conf apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64/
echo "./apache-incubator-servicecomb-service-center > start-sc.log 2>&1 &" >> apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64/start.sh
echo "kill -9 \$(ps aux | grep 'apache-incubator-servicecomb-service-center' | awk '{print \$2}')" >> apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64/stop.sh
chmod +x apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64/start.sh
chmod +x apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64/stop.sh
cp -r LICENSE apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64/
cp -r NOTICE apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64/
cp -r DISCLAIMER apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64/
cp -r README.md apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64/
tar -czvf apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64.tar.gz apache-incubator-servicecomb-service-center-$PACKAGE-linux-amd64

}

Expand All @@ -108,26 +108,26 @@ build_windows(){
fi

set +e
rm -rf servicecomb-service-center-$PACKAGE-windows-amd64
rm -rf servicecomb-service-center-$PACKAGE-windows-amd64.zip
rm -rf apache-incubator-servicecomb-service-center-$PACKAGE-windows-amd64
rm -rf apache-incubator-servicecomb-service-center-$PACKAGE-windows-amd64.zip

set -e
mkdir -p servicecomb-service-center-$PACKAGE-windows-amd64
mkdir -p apache-incubator-servicecomb-service-center-$PACKAGE-windows-amd64
export GOOS=windows
export GIT_COMMIT=$(git log --pretty=format:'%h' -n 1)
export BUILD_NUMBER=$RELEASE
GO_LDFLAGS="${GO_LDFLAGS} -X 'github.com/apache/incubator-servicecomb-service-center/version.BUILD_TAG=$(date +%Y%m%d%H%M%S).$BUILD_NUMBER.$GIT_COMMIT'"
GO_LDFLAGS="${GO_LDFLAGS} -X 'github.com/apache/incubator-servicecomb-service-center/version.VERSION=$BUILD_NUMBER'"
go build --ldflags "${GO_LDFLAGS}" -o incubator-servicecomb-service-center.exe
cp -r incubator-servicecomb-service-center.exe servicecomb-service-center-$PACKAGE-windows-amd64
go build --ldflags "${GO_LDFLAGS}" -o apache-incubator-servicecomb-service-center.exe
cp -r apache-incubator-servicecomb-service-center.exe apache-incubator-servicecomb-service-center-$PACKAGE-windows-amd64
prepare_conf
cp -r tmp/conf servicecomb-service-center-$PACKAGE-windows-amd64/
echo "incubator-servicecomb-service-center.exe" >> servicecomb-service-center-$PACKAGE-windows-amd64/start.bat
cp -r LICENSE servicecomb-service-center-$PACKAGE-windows-amd64/
cp -r NOTICE servicecomb-service-center-$PACKAGE-windows-amd64/
cp -r DISCLAIMER servicecomb-service-center-$PACKAGE-windows-amd64/
cp -r README.md servicecomb-service-center-$PACKAGE-windows-amd64/
tar -czvf servicecomb-service-center-$PACKAGE-windows-amd64.tar.gz servicecomb-service-center-$PACKAGE-windows-amd64
cp -r tmp/conf apache-incubator-servicecomb-service-center-$PACKAGE-windows-amd64/
echo "apache-incubator-servicecomb-service-center.exe" >> apache-incubator-servicecomb-service-center-$PACKAGE-windows-amd64/start.bat
cp -r LICENSE apache-incubator-servicecomb-service-center-$PACKAGE-windows-amd64/
cp -r NOTICE apache-incubator-servicecomb-service-center-$PACKAGE-windows-amd64/
cp -r DISCLAIMER apache-incubator-servicecomb-service-center-$PACKAGE-windows-amd64/
cp -r README.md apache-incubator-servicecomb-service-center-$PACKAGE-windows-amd64/
tar -czvf apache-incubator-servicecomb-service-center-$PACKAGE-windows-amd64.tar.gz apache-incubator-servicecomb-service-center-$PACKAGE-windows-amd64
}

## Compile the binary
Expand Down

0 comments on commit e171eac

Please sign in to comment.