mirror of https://github.com/dapr/quickstarts.git
Java quickstarts auto validate for pubsub, state mgmt and service invo (#671)
* Java quickstarts auto validate changes Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com> * changing action-setup-docker version for macos failures Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com> * Changing actions-setup-docker version to v1 Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com> * Script for installing docker on macos instead of actions-setup-docker Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
This commit is contained in:
parent
2ae022f576
commit
eb69a7ce12
|
@ -43,10 +43,13 @@ jobs:
|
|||
steps:
|
||||
- name: Install docker - MacOS
|
||||
if: matrix.os == 'macos-10.15'
|
||||
uses: docker-practice/actions-setup-docker@1.0.8
|
||||
with:
|
||||
docker_buildx: false
|
||||
docker_version: 20.10
|
||||
run: |
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||
brew install --cask docker
|
||||
sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components
|
||||
open -a /Applications/Docker.app --args --unattended --accept-license
|
||||
while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done
|
||||
docker --version
|
||||
- name: Configure KinD
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
# Generate a KinD configuration file that uses:
|
||||
|
@ -81,7 +84,7 @@ jobs:
|
|||
cluster_name: kind
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
- name: Install minikube - MacOS
|
||||
if: matrix.os == 'macos-10.15'
|
||||
if: matrix.os == 'macos-10.15'
|
||||
run: |
|
||||
brew install kubernetes-cli || brew link --overwrite kubernetes-cli
|
||||
brew install minikube
|
||||
|
|
|
@ -43,14 +43,22 @@ jobs:
|
|||
steps:
|
||||
- name: Install docker - MacOS
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: docker-practice/actions-setup-docker@1.0.8
|
||||
with:
|
||||
docker_buildx: false
|
||||
docker_version: 20.10
|
||||
run: |
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||
brew install --cask docker
|
||||
sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components
|
||||
open -a /Applications/Docker.app --args --unattended --accept-license
|
||||
while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done
|
||||
docker --version
|
||||
- name: Set up Go ${{ env.GOVER }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ env.GOVER }}
|
||||
- name: Set up OpenJDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 11
|
||||
- name: Determine latest Dapr Runtime version including Pre-releases
|
||||
run: |
|
||||
helm repo add dapr https://dapr.github.io/helm-charts/ && helm repo update && export RUNTIME_VERSION=$(helm search repo dapr/dapr --devel --versions | awk '/dapr\/dapr/ {print $3; exit}' )
|
||||
|
@ -111,6 +119,16 @@ jobs:
|
|||
pushd pub_sub/python/sdk
|
||||
make validate
|
||||
popd
|
||||
- name: Validate java http pubsub
|
||||
run: |
|
||||
pushd pub_sub/java/http
|
||||
make validate
|
||||
popd
|
||||
- name: Validate java sdk pubsub
|
||||
run: |
|
||||
pushd pub_sub/java/sdk
|
||||
make validate
|
||||
popd
|
||||
- name: Linkcheck README.md
|
||||
run: |
|
||||
make validate
|
||||
|
|
|
@ -43,10 +43,13 @@ jobs:
|
|||
steps:
|
||||
- name: Install docker - MacOS
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: docker-practice/actions-setup-docker@1.0.8
|
||||
with:
|
||||
docker_buildx: false
|
||||
docker_version: 20.10
|
||||
run: |
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||
brew install --cask docker
|
||||
sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components
|
||||
open -a /Applications/Docker.app --args --unattended --accept-license
|
||||
while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done
|
||||
docker --version
|
||||
- name: Set up Go ${{ env.GOVER }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
|
|
|
@ -43,14 +43,22 @@ jobs:
|
|||
steps:
|
||||
- name: Install docker - MacOS
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: docker-practice/actions-setup-docker@1.0.8
|
||||
with:
|
||||
docker_buildx: false
|
||||
docker_version: 20.10
|
||||
run: |
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||
brew install --cask docker
|
||||
sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components
|
||||
open -a /Applications/Docker.app --args --unattended --accept-license
|
||||
while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done
|
||||
docker --version
|
||||
- name: Set up Go ${{ env.GOVER }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ env.GOVER }}
|
||||
- name: Set up OpenJDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 11
|
||||
- name: Determine latest Dapr Runtime version including Pre-releases
|
||||
run: |
|
||||
helm repo add dapr https://dapr.github.io/helm-charts/ && helm repo update && export RUNTIME_VERSION=$(helm search repo dapr/dapr --devel --versions | awk '/dapr\/dapr/ {print $3; exit}' )
|
||||
|
@ -96,6 +104,11 @@ jobs:
|
|||
pushd service_invocation/python/http
|
||||
make validate
|
||||
popd
|
||||
- name: Validate java http service invocation
|
||||
run: |
|
||||
pushd service_invocation/java/http
|
||||
make validate
|
||||
popd
|
||||
- name: Linkcheck README.md
|
||||
run: |
|
||||
make validate
|
||||
|
|
|
@ -43,14 +43,22 @@ jobs:
|
|||
steps:
|
||||
- name: Install docker - MacOS
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: docker-practice/actions-setup-docker@1.0.8
|
||||
with:
|
||||
docker_buildx: false
|
||||
docker_version: 20.10
|
||||
run: |
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||
brew install --cask docker
|
||||
sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components
|
||||
open -a /Applications/Docker.app --args --unattended --accept-license
|
||||
while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done
|
||||
docker --version
|
||||
- name: Set up Go ${{ env.GOVER }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ env.GOVER }}
|
||||
- name: Set up OpenJDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 11
|
||||
- name: Determine latest Dapr Runtime version including Pre-releases
|
||||
run: |
|
||||
helm repo add dapr https://dapr.github.io/helm-charts/ && helm repo update && export RUNTIME_VERSION=$(helm search repo dapr/dapr --devel --versions | awk '/dapr\/dapr/ {print $3; exit}' )
|
||||
|
@ -91,16 +99,16 @@ jobs:
|
|||
pushd state_management/go/sdk
|
||||
make validate
|
||||
popd
|
||||
# - name: Validate Java http State Management
|
||||
# run: |
|
||||
# pushd state_management/java/http
|
||||
# make validate
|
||||
# popd
|
||||
# - name: Validate Java sdk State Management
|
||||
# run: |
|
||||
# pushd state_management/java/sdk
|
||||
# make validate
|
||||
# popd
|
||||
- name: Validate Java http State Management
|
||||
run: |
|
||||
pushd state_management/java/http
|
||||
make validate
|
||||
popd
|
||||
- name: Validate Java sdk State Management
|
||||
run: |
|
||||
pushd state_management/java/sdk
|
||||
make validate
|
||||
popd
|
||||
- name: Validate Python http State Management
|
||||
run: |
|
||||
pushd state_management/python/http
|
||||
|
|
|
@ -49,6 +49,7 @@ background: true
|
|||
sleep: 10
|
||||
-->
|
||||
```bash
|
||||
cd ./order-processor
|
||||
dapr run --app-port 8080 --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
@ -81,6 +82,7 @@ sleep: 10
|
|||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
dapr run --app-id checkout --components-path ../../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
|
|
@ -49,6 +49,7 @@ background: true
|
|||
sleep: 10
|
||||
-->
|
||||
```bash
|
||||
cd ./order-processor
|
||||
dapr run --app-port 8080 --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
@ -82,7 +83,8 @@ sleep: 10
|
|||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --components-path ../../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
|
||||
cd ./checkout
|
||||
dapr run --app-id checkout --components-path ../../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
|
|
|
@ -23,27 +23,22 @@ And one order processor service:
|
|||
|
||||
### Run Java order-processor with Dapr
|
||||
|
||||
1. Open a new terminal window and navigate to `order-processor` directory:
|
||||
|
||||
```bash
|
||||
cd order-processor
|
||||
```
|
||||
|
||||
2. Install dependencies:
|
||||
1. Open a new terminal window and navigate to `order-processor` directory and install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install maven dependencies
|
||||
working_dir: ./order-processor
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
mvn clean install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
3. Run the Java order-processor app with Dapr:
|
||||
|
||||
2. Run the Java order-processor app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Java checkout service
|
||||
name: Run Java order-processor service
|
||||
expected_stdout_lines:
|
||||
- "== APP == Order received: 1"
|
||||
- "== APP == Order received: 2"
|
||||
|
@ -54,31 +49,27 @@ sleep: 10
|
|||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id order-processor --app-port 6001 --app-protocol http --dapr-http-port 3501 -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
|
||||
cd ./order-processor
|
||||
dapr run --app-id order-processor --app-port 9001 --app-protocol http --dapr-http-port 3501 -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Java checkout service with Dapr
|
||||
|
||||
1. Open a new terminal window and navigate to `checkout` directory:
|
||||
|
||||
```bash
|
||||
cd checkout
|
||||
```
|
||||
|
||||
2. Install dependencies:
|
||||
1. Open a new terminal window and navigate to `checkout` directory and install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install maven dependencies
|
||||
working_dir: ./checkout
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
mvn clean install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
3. Run the Java checkout app with Dapr:
|
||||
2. Run the Java checkout app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Java checkout service
|
||||
|
@ -92,11 +83,13 @@ sleep: 15
|
|||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
dapr stop --app-id checkout
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
|
|
|
@ -1 +1 @@
|
|||
server.port=${port:6001}
|
||||
server.port=${port:9001}
|
||||
|
|
Loading…
Reference in New Issue