Skip to content

Commit

Permalink
fix AWS Containers Retail Sample
Browse files Browse the repository at this point in the history
  • Loading branch information
seifrajhi committed Jan 26, 2024
1 parent c0f0b56 commit 13e7f14
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-cart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
env:
MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
run: |
src/cart/retail-store-sample-app/scripts/ci.sh
retail-store-sample-app/src/cart/scripts/ci.sh
- name: Set up QEMU
id: qemu
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- name: Run CI script
run: |
src/catalog/retail-store-sample-app/scripts/ci.sh
retail-store-sample-app/src/catalog/scripts/ci.sh
- name: Set up QEMU
id: qemu
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-checkout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Run CI script
run: |
bash src/checkout/retail-store-sample-app/scripts/ci.sh
bash retail-store-sample-app/src/checkout/scripts/ci.sh
- name: Set up QEMU
id: qemu
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-orders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
env:
MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
run: |
src/orders/retail-store-sample-app/scripts/ci.sh
retail-store-sample-app/src/orders/scripts/ci.sh
- name: Set up QEMU
id: qemu
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
env:
MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
run: |
src/ui/retail-store-sample-app/scripts/ci.sh
retail-store-sample-app/src/ui/scripts/ci.sh
- name: Set up QEMU
id: qemu
Expand Down
16 changes: 8 additions & 8 deletions retail-store-sample-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ The application has been deliberately over-engineered to generate multiple de-co

| Component | Language | Container Image | Description |
|-----------|----------|---------------------|-----------------------------------------------------------------------------|
| ![ui workflow](https://github.com/aws-containers/retail-store-sample-app/actions/workflows/ci-ui.yml/badge.svg) | Java | [Link](https://gallery.ecr.aws/aws-containers/retail-store-sample-ui) | Aggregates API calls to the various other services and renders the HTML UI. |
| ![catalog workflow](https://github.com/aws-containers/retail-store-sample-app/actions/workflows/ci-catalog.yml/badge.svg) | Go | [Link](https://gallery.ecr.aws/aws-containers/retail-store-sample-catalog) | Product catalog API |
| ![cart workflow](https://github.com/aws-containers/retail-store-sample-app/actions/workflows/ci-cart.yml/badge.svg) | Java | [Link](https://gallery.ecr.aws/aws-containers/retail-store-sample-cart) | User shopping carts API |
| ![orders workflow](https://github.com/aws-containers/retail-store-sample-app/actions/workflows/ci-orders.yml/badge.svg) | Java | [Link](https://gallery.ecr.aws/aws-containers/retail-store-sample-orders) | User orders API |
| ![checkout workflow](https://github.com/aws-containers/retail-store-sample-app/actions/workflows/ci-checkout.yml/badge.svg) | Node | [Link](https://gallery.ecr.aws/aws-containers/retail-store-sample-checkout) | API to orchestrate the checkout process |
| ![assets workflow](https://github.com/aws-containers/retail-store-sample-app/actions/workflows/ci-assets.yml/badge.svg) | Nginx | [Link](https://gallery.ecr.aws/aws-containers/retail-store-sample-assets) | Serves static assets like images related to the product catalog |
| ![ui workflow](https://github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/actions/workflows/ci-ui.yml/badge.svg) | Java | [Link](https://gallery.ecr.aws/aws-containers/retail-store-sample-ui) | Aggregates API calls to the various other services and renders the HTML UI. |
| ![catalog workflow](https://github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/actions/workflows/ci-catalog.yml/badge.svg) | Go | [Link](https://gallery.ecr.aws/aws-containers/retail-store-sample-catalog) | Product catalog API |
| ![cart workflow](https://github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/actions/workflows/ci-cart.yml/badge.svg) | Java | [Link](https://gallery.ecr.aws/aws-containers/retail-store-sample-cart) | User shopping carts API |
| ![orders workflow](https://github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/actions/workflows/ci-orders.yml/badge.svg) | Java | [Link](https://gallery.ecr.aws/aws-containers/retail-store-sample-orders) | User orders API |
| ![checkout workflow](https://github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/actions/workflows/ci-checkout.yml/badge.svg) | Node | [Link](https://gallery.ecr.aws/aws-containers/retail-store-sample-checkout) | API to orchestrate the checkout process |
| ![assets workflow](https://github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/actions/workflows/ci-assets.yml/badge.svg) | Nginx | [Link](https://gallery.ecr.aws/aws-containers/retail-store-sample-assets) | Serves static assets like images related to the product catalog |

## Quickstart

Expand All @@ -45,7 +45,7 @@ Pre-requisites:
Use `kubectl` to run the application:

```
kubectl apply -f https://raw.githubusercontent.com/aws-containers/retail-store-sample-app/main/dist/kubernetes/deploy.yaml
kubectl apply -f https://raw.githubusercontent.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/main/retail-store-sample-app/dist/kubernetes/deploy.yaml
kubectl wait --for=condition=available deployments --all
```

Expand All @@ -58,7 +58,7 @@ kubectl get svc ui
To remove the application use `kubectl` again:

```
kubectl delete -f https://raw.githubusercontent.com/aws-containers/retail-store-sample-app/main/dist/kubernetes/deploy.yaml
kubectl delete -f https://raw.githubusercontent.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/main/retail-store-sample-app/dist/kubernetes/deploy.yaml
```

### Docker Compose
Expand Down
2 changes: 1 addition & 1 deletion retail-store-sample-app/oss/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function golicenses()

mkdir -p $component_output_dir

(cd $component_dir && go-licenses report --template $script_dir/golicenses/template.tpl --ignore github.com/aws-containers/retail-store-sample-app . > $component_output_dir/licenses.csv)
(cd $component_dir && go-licenses report --template $script_dir/golicenses/template.tpl --ignore github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app . > $component_output_dir/licenses.csv)
}

function run_ort()
Expand Down
4 changes: 2 additions & 2 deletions retail-store-sample-app/src/catalog/api/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package api
import (
"context"

"github.com/aws-containers/retail-store-sample-app/catalog/model"
"github.com/aws-containers/retail-store-sample-app/catalog/repository"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/model"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/repository"
)

// CatalogAPI type
Expand Down
6 changes: 3 additions & 3 deletions retail-store-sample-app/src/catalog/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"strconv"
"strings"

"github.com/aws-containers/retail-store-sample-app/catalog/api"
"github.com/aws-containers/retail-store-sample-app/catalog/httputil"
"github.com/aws-containers/retail-store-sample-app/catalog/model"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/api"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/httputil"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/model"
"github.com/gin-gonic/gin"
)

Expand Down
2 changes: 1 addition & 1 deletion retail-store-sample-app/src/catalog/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/aws-containers/retail-store-sample-app/catalog
module github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog

go 1.18

Expand Down
10 changes: 5 additions & 5 deletions retail-store-sample-app/src/catalog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import (
"syscall"
"time"

"github.com/aws-containers/retail-store-sample-app/catalog/api"
"github.com/aws-containers/retail-store-sample-app/catalog/config"
"github.com/aws-containers/retail-store-sample-app/catalog/controller"
_ "github.com/aws-containers/retail-store-sample-app/catalog/docs"
"github.com/aws-containers/retail-store-sample-app/catalog/repository"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/api"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/config"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/controller"
_ "github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/docs"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/repository"
"github.com/gin-gonic/gin"
_ "github.com/go-sql-driver/mysql"
"github.com/prometheus/client_golang/prometheus"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"log"
"strings"

"github.com/aws-containers/retail-store-sample-app/catalog/config"
"github.com/aws-containers/retail-store-sample-app/catalog/model"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/config"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/model"
"github.com/dlmiddlecote/sqlstats"
"github.com/golang-migrate/migrate/v4"
_ "github.com/golang-migrate/migrate/v4/database/mysql"
Expand Down
4 changes: 2 additions & 2 deletions retail-store-sample-app/src/catalog/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"context"
"fmt"

"github.com/aws-containers/retail-store-sample-app/catalog/config"
"github.com/aws-containers/retail-store-sample-app/catalog/model"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/config"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/model"
"github.com/prometheus/client_golang/prometheus"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/aws-containers/retail-store-sample-app/catalog/model"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/model"
)

func TestCatalogList(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions retail-store-sample-app/src/catalog/test/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import (
"github.com/testcontainers/testcontainers-go"
"github.com/testcontainers/testcontainers-go/wait"

"github.com/aws-containers/retail-store-sample-app/catalog/api"
"github.com/aws-containers/retail-store-sample-app/catalog/config"
"github.com/aws-containers/retail-store-sample-app/catalog/controller"
"github.com/aws-containers/retail-store-sample-app/catalog/repository"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/api"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/config"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/controller"
"github.com/seifrajhi/Kubernetes-practical-exercises-Hands-on/retail-store-sample-app/catalog/repository"

"github.com/gin-gonic/gin"
)
Expand Down

0 comments on commit 13e7f14

Please sign in to comment.