WillemJiang closed pull request #174: Add guide on how to build and run alpha 
server
URL: https://github.com/apache/incubator-servicecomb-saga/pull/174
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/alpha/README.md b/alpha/README.md
new file mode 100644
index 00000000..a1d21a66
--- /dev/null
+++ b/alpha/README.md
@@ -0,0 +1,33 @@
+# alpha-server
+
+The alpha-server works as the pack leader to keep the consistency of 
transactions.
+For more information, see [saga pack 
design](https://github.com/apache/incubator-servicecomb-saga/blob/master/docs/design.md)
+
+## Build and Run
+
+### Via docker image
+Build the executable files and docker image:
+```
+mvn clean package -DskipTests -Pdocker -Pdemo
+```
+
+Then play `alpha-server` image with docker, docker-compose or any other 
container based environment.
+
+You can override the configurations by `JAVA_OPTS` environment variable:
+```
+docker run -d -p 8080:8080 -p 8090:8090 \ 
+-e "JAVA_OPTS=-Dspring.profiles.active=prd 
-Dspring.datasource.url=jdbc:postgresql://${host_address}:5432/saga?useSSL=false"
 alpha-server:${saga_version}
+```
+
+
+### Via executable file
+
+Build the executable files:
+```bash
+mvn clean package -DskipTests -Pdemo
+```
+
+And run:
+```
+java -Dspring.profiles.active=prd 
-D"spring.datasource.url=jdbc:postgresql://${host_address}:5432/saga?useSSL=false"
 -jar alpha-server-${saga_version}-exec.jar
+```
diff --git a/saga-demo/booking/README.md b/saga-demo/booking/README.md
index 4c642b31..1540e29a 100644
--- a/saga-demo/booking/README.md
+++ b/saga-demo/booking/README.md
@@ -10,11 +10,13 @@ You will need:
 2. [Maven 3.x][maven]
 3. [Docker][docker]
 4. [Docker compose][docker_compose]
+5. [alpha server][alpha_server]
 
 [jdk]: 
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
 [maven]: https://maven.apache.org/install.html
 [docker]: https://www.docker.com/get-docker
 [docker_compose]: https://docs.docker.com/compose/install/
+[alpha_server]: 
https://github.com/apache/incubator-servicecomb-saga/tree/master/alpha
 
 ## Running Demo
 You can run the demo using either docker compose or executable files.


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to