Skip to content

Commit 9e02a61

Browse files
authored
Merge branch 'master' into smi-conformace
2 parents 76ab46e + c110733 commit 9e02a61

File tree

8 files changed

+238
-51
lines changed

8 files changed

+238
-51
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Learn Layer5
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
docker:
11+
name: Docker build and push
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out code
15+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success()
16+
uses: actions/checkout@master
17+
with:
18+
fetch-depth: 1
19+
- name: Docker login
20+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success()
21+
uses: azure/docker-login@v1
22+
with:
23+
username: ${{ secrets.DOCKER_USERNAME }}
24+
password: ${{ secrets.DOCKER_PASSWORD }}
25+
- name: Docker build & push
26+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success()
27+
run: |
28+
make build-img-service
29+
make image-push

Makefile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
1+
VER=$(shell git rev-parse --short HEAD)
2+
13
build-service:
24
cd service && go build -a -o ./main .
35

4-
run-service: build-service
6+
run-service-a:
7+
SERVICE_NAME="service-a" \
8+
PORT=9091 \
9+
./service/main
10+
11+
run-service-b:
12+
SERVICE_NAME="service-b" \
13+
PORT=9092 \
514
./service/main
615

716
build-img-service:
8-
cd service && docker build -t layer5/sample-app-service:dev .
17+
cd service && docker build -t layer5/learn-layer5:latest -t layer5/learn-layer5:$(VER) .
18+
19+
image-push:
20+
docker push layer5/learn-layer5

README.md

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
1-
# learn-layer5
1+
<p style="text-align:center;" align="center">
2+
<img align="center" src="https://raw.githubusercontent.com/layer5io/layer5/master/assets/images/layer5/layer5-tag-white-bg.png" width="45%" /></p>
23

3-
# To check for smi conformance of a deployed service mesh
4-
We use kuttl to check for SMI conformance. All the tests are writtten in smi-test directory of this repository.
5-
Execute the following command to run the smi-conformace tests:-
4+
![GitHub contributors](https://img.shields.io/github/contributors/layer5io/layer5.svg)
5+
![GitHub](https://img.shields.io/github/license/layer5io/layer5.svg)
6+
[![Docker Pulls](https://img.shields.io/docker/pulls/layer5/learn-layer5.svg)](https://hub.docker.com/r/layer5/learn-layer5)
7+
[![Go Report Card](https://goreportcard.com/badge/github.com/layer5io/learn-layer5)](https://goreportcard.com/report/github.com/layer5io/learn-layer5)
8+
[![GitHub issues by-label](https://img.shields.io/github/issues/layer5io/learn-layer5/help%20wanted.svg)](https://github.com/issues?utf8=✓&q=is%3Aopen+is%3Aissue+archived%3Afalse+org%3Alayer5io+label%3A%22help+wanted%22+")
9+
[![Website](https://img.shields.io/website/https/layer5.io/meshery.svg)](https://layer5.io)
10+
[![Twitter Follow](https://img.shields.io/twitter/follow/layer5.svg?label=Follow&style=social)](https://twitter.com/intent/follow?screen_name=mesheryio)
11+
[![Slack](http://slack.layer5.io/badge.svg)](http://slack.layer5.io)
12+
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3564/badge)](https://bestpractices.coreinfrastructure.org/projects/3564)
613

7-
```shell
8-
kubectl kuttl test --skip-cluster-delete=true --start-kind=false ./smi-test
9-
```
14+
<p style="clear:both;">
15+
<h2>Learn Layer5</h2>
16+
17+
The Learn Layer5 sample application is to be available for use across all service meshes that Meshery supports and is to used as:
18+
19+
- a learning device (for [service mesh workshops](https://layer5.io/workshops))
20+
- for [Service Mesh Interface conformance](https://docs.google.com/document/d/1HL8Sk7NSLLj-9PRqoHYVIGyU6fZxUQFotrxbmfFtjwc/edit#)
1021

11-
## Service
22+
## Application Architecture
23+
The Learn Layer5 application includes three services: `app-a`, `app-b`, and `app-c`. Each service is listening on port `9091/tcp`.
24+
25+
### Service
1226

1327
The following are the routes defined by the `service` app and their functionality.
1428

15-
##### POST /call
29+
#### POST /call
1630

1731
This is the route whose metrics will be collected by the app. This route can be used to make the service call any other web service.
1832

@@ -75,7 +89,7 @@ curl --location --request POST 'http://localhost:9091/call' \
7589
}
7690
```
7791

78-
##### GET /metrics
92+
#### GET /metrics
7993

8094
Gets the metrics from `service`
8195
```shell
@@ -93,7 +107,7 @@ curl --location --request GET 'localhost:9091/metrics' \
93107
}
94108
```
95109

96-
##### DELETE /metrics
110+
#### DELETE /metrics
97111

98112
Clears the counters in `service`
99113
```shell
@@ -104,4 +118,36 @@ curl --location --request DELETE 'localhost:9091/metrics' \
104118
"hello": "bye"
105119
}'
106120
# No Output
107-
```
121+
```
122+
123+
<br /><br /><p align="center"><i>If you’re using Learn Layer5 or if you like the project, please <a href="https://github.com/layer5io/meshery/stargazers">★</a> star this repository to show your support! 🤩</i></p>
124+
</p>
125+
126+
<p style="clear:both;">
127+
<h2><a name="contributing"></a><a name="community"></a> <a href="http://slack.layer5.io">Community</a> and <a href="https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md">Contributing</a></h2>
128+
Our projects are community-built and welcome collaboration. 👍 Be sure to see the <a href="https://docs.google.com/document/d/17OPtDE_rdnPQxmk2Kauhm3GwXF1R5dZ3Cj8qZLKdo5E/edit">Layer5 Contributor Welcome Guide</a> for a tour of resources available to you and jump into our <a href="http://slack.layer5.io">Slack</a>! Contributors are expected to adhere to the <a href="https://github.com/cncf/foundation/blob/master/code-of-conduct.md">CNCF Code of Conduct</a>.
129+
130+
<a href="https://meshery.io/community"><img alt="Layer5 Service Mesh Community" src="img/readme/slack-128.png" style="margin-left:10px;padding-top:5px;" width="110px" align="right" /></a>
131+
132+
<a href="http://slack.layer5.io"><img alt="Layer5 Service Mesh Community" src="img/readme/community.svg" style="margin-right:8px;padding-top:5px;" width="140px" align="left" /></a>
133+
134+
<p>
135+
✔️ <em><strong>Join</strong></em> <a href="https://drive.google.com/open?id=1c07UO9dS7_tFD-ClCWHIrEzRnzUJoFQ10EzfJTpS7FY">weekly community meeting</a> on <a href="https://bit.ly/2SbrRhe">Fridays from 10am - 11am Central</a>.<br />
136+
✔️ <em><strong>Watch</strong></em> community <a href="https://www.youtube.com/channel/UCFL1af7_wdnhHXL1InzaMvA?sub_confirmation=1">meeting recordings</a>.<br />
137+
✔️ <em><strong>Access</strong></em> the <a href="https://drive.google.com/drive/u/4/folders/0ABH8aabN4WAKUk9PVA">community drive</a>.<br />
138+
</p>
139+
<p align="center">
140+
<i>Not sure where to start?</i> Grab an open issue with the <a href="https://github.com/issues?utf8=✓&q=is%3Aopen+is%3Aissue+archived%3Afalse+org%3Alayer5io+label%3A%22help+wanted%22+">help-wanted label</a>.
141+
</p>
142+
143+
## About Layer5
144+
145+
**Community First**
146+
<p>The <a href="https://layer5.io">Layer5</a> community represents the largest collection of service mesh projects and their maintainers in the world.</p>
147+
148+
**Open Source First**
149+
<p>We build projects to provide learning environments, deployment and operational best practices, performance benchmarks, create documentation, share networking opportunities, and more. Our shared commitment to the open source spirit pushes Layer5 projects forward.</p>
150+
151+
**License**
152+
153+
This repository and site are available as open source under the terms of the [Apache 2.0 License](https://opensource.org/licenses/Apache-2.0).

img/readme/community.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

img/readme/slack-128.png

4.53 KB
Loading

service/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM golang:1.13.5 as bd
22
WORKDIR /github.com/layer5io/sample-app-service
33
ADD . .
4-
RUN GOPROXY=direct GOSUMDB=off go build -a -o /main .
5-
CMD ["/main"]
4+
RUN GOPROXY=direct GOSUMDB=off go build -a -o ./main .
5+
CMD ["./main"]

0 commit comments

Comments
 (0)