├── .gitignore ├── Jenkinsfile-curriculum ├── README.md ├── adopt-a-pup ├── Readme.MD ├── adoption-service │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── do328 │ │ │ └── adoptApup │ │ │ └── adoptionservice │ │ │ ├── AdoptionController.java │ │ │ ├── AdoptionServiceApplication.java │ │ │ ├── model │ │ │ ├── AdoptionApplication.java │ │ │ ├── AdoptionApplicationResponse.java │ │ │ ├── Animal.java │ │ │ ├── AnimalSize.java │ │ │ ├── AnimalStatusChangeRequest.java │ │ │ ├── Email.java │ │ │ ├── EmailNotificationRequest.java │ │ │ ├── Residency.java │ │ │ ├── Shelter.java │ │ │ └── Status.java │ │ │ └── service │ │ │ └── AdoptionService.java │ │ └── resources │ │ ├── application.properties │ │ └── templates │ │ └── applicationApproval.st ├── animal-service │ ├── .gitignore │ ├── pom.xml │ ├── src │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── redhat │ │ │ │ └── do328 │ │ │ │ └── adoptApup │ │ │ │ └── animalservice │ │ │ │ ├── AnimalController.java │ │ │ │ ├── AnimalServiceApplication.java │ │ │ │ ├── dao │ │ │ │ ├── AnimalNotificationSubscriptionRepository.java │ │ │ │ └── AnimalRepository.java │ │ │ │ ├── model │ │ │ │ ├── Animal.java │ │ │ │ ├── AnimalNotificationRequestCriteria.java │ │ │ │ ├── AnimalSize.java │ │ │ │ ├── AnimalStatusChangeRequest.java │ │ │ │ ├── Email.java │ │ │ │ ├── EmailNotificationRequest.java │ │ │ │ └── Residency.java │ │ │ │ └── service │ │ │ │ └── AnimalService.java │ │ │ └── resources │ │ │ ├── application.properties │ │ │ └── templates │ │ │ └── animalNotificationRequest.st │ └── v2-logger.patch ├── kubefiles │ ├── adoption-service.yaml │ ├── animal-service.yaml │ ├── email-service.yaml │ ├── frontend-template.yaml │ ├── mongodb-template.yaml │ ├── news-service.yaml │ ├── notification-service.yaml │ ├── service-mesh.yaml │ └── shelter-service.yaml ├── mongo-data │ ├── animals.mongo │ ├── dog-photos │ │ ├── Gus.jpg │ │ ├── Harvey.jpg │ │ ├── Theo.jpg │ │ └── Winston.jpg │ └── shelters.mongo ├── notification-service │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── do328 │ │ │ └── adoptApup │ │ │ └── notificationservice │ │ │ ├── NotificationController.java │ │ │ ├── NotificationServiceApplication.java │ │ │ ├── models │ │ │ ├── ApplicationNotification.java │ │ │ ├── Email.java │ │ │ ├── EmailNotificationRequest.java │ │ │ ├── NotificationStatusResponse.java │ │ │ ├── SearchNotification.java │ │ │ └── Status.java │ │ │ └── services │ │ │ └── EmailManagerService.java │ │ └── resources │ │ └── application.properties ├── raw-images │ ├── README.md │ ├── barney.jpg │ ├── darwin.jpg │ ├── gus.jpg │ ├── theo.jpg │ └── winston.jpg ├── scripts │ ├── deploy-frontend.sh │ ├── deploy-mongo.sh │ └── populate-mongo.sh ├── shelter-service │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── do328 │ │ │ └── adoptApup │ │ │ └── shelterservice │ │ │ ├── ShelterController.java │ │ │ ├── ShelterServiceApplication.java │ │ │ ├── dao │ │ │ └── ShelterDao.java │ │ │ ├── model │ │ │ └── Shelter.java │ │ │ └── service │ │ │ └── ShelterService.java │ │ └── resources │ │ └── application.properties ├── user-service │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── redhat │ │ │ │ └── do328 │ │ │ │ └── adoptApup │ │ │ │ └── userservice │ │ │ │ ├── UserController.java │ │ │ │ ├── UserServiceApplication.java │ │ │ │ ├── dao │ │ │ │ └── UserRepository.java │ │ │ │ ├── model │ │ │ │ └── User.java │ │ │ │ └── service │ │ │ │ └── MongoUserService.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── redhat │ │ └── do328 │ │ └── adoptApup │ │ └── userservice │ │ └── UserServiceApplicationTests.java └── web-app │ ├── .dockerignore │ ├── .env.example │ ├── .eslintrc.json │ ├── .gitignore │ ├── Dockerfile │ ├── Jenkinsfile │ ├── README.md │ ├── config │ ├── env.js │ ├── getHttpsConfig.js │ ├── jest │ │ ├── cssTransform.js │ │ └── fileTransform.js │ ├── modules.js │ ├── paths.js │ ├── pnpTs.js │ ├── webpack.config.js │ └── webpackDevServer.config.js │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ ├── photos │ │ ├── a1.jpeg │ │ ├── a89cd4fc-16ce-4b51-8dd1-866d7d793322.jpeg │ │ ├── aac7ea0a-2374-4d4b-8d3a-71e4f896e751.jpeg │ │ ├── b62977ad-fe79-4480-a550-06f717923017.jpeg │ │ ├── d52a8d58-9024-49dd-92b6-d443c6049ffe.jpeg │ │ └── e22d494c-c2be-4d32-bceb-ec675fd5540a.jpeg │ └── robots.txt │ ├── scripts │ ├── build.js │ ├── build_image │ ├── build_image_v1 │ ├── build_image_v2 │ ├── start.js │ └── test.js │ ├── server.js │ ├── src │ ├── App.test.tsx │ ├── App.tsx │ ├── Components │ │ ├── AdoptableAnimalList.test.tsx │ │ ├── AdoptableAnimalList.tsx │ │ ├── AdoptionForm.test.tsx │ │ ├── AdoptionForm.tsx │ │ ├── AnimalCreateForm.test.tsx │ │ ├── AnimalCreateForm.tsx │ │ ├── BullseyeSpinner.tsx │ │ ├── LoadingData.tsx │ │ ├── NavList.tsx │ │ ├── NewsBoard.test.tsx │ │ ├── NewsBoard.tsx │ │ ├── NotificationRequestForm.tsx │ │ ├── PhotoGallery.test.tsx │ │ ├── PhotoGallery.tsx │ │ ├── ShelterCreateForm.test.tsx │ │ ├── ShelterCreateForm.tsx │ │ └── SheltersList.tsx │ ├── Config.ts │ ├── Layout.tsx │ ├── Models │ │ ├── AdoptionApplication.ts │ │ ├── Animal.ts │ │ ├── AnimalNotificationRequest.ts │ │ ├── ApproximateSize.ts │ │ ├── News.ts │ │ ├── Residency.ts │ │ └── Shelter.ts │ ├── Services │ │ ├── AdoptionFakeService.ts │ │ ├── AdoptionRESTService.test.ts │ │ ├── AdoptionRESTService.ts │ │ ├── AdoptionService.ts │ │ ├── AnimalFakeService.ts │ │ ├── AnimalRESTService.ts │ │ ├── AnimalService.ts │ │ ├── Delayer.ts │ │ ├── NewsFakeService.ts │ │ ├── NewsRESTService.ts │ │ ├── NewsService.ts │ │ ├── PhotoService.ts │ │ ├── PhotoStaticListService.ts │ │ ├── RESTService.ts │ │ ├── ShelterFakeService.ts │ │ ├── ShelterRESTService.ts │ │ └── ShelterService.ts │ ├── Views │ │ ├── AnimalCreateView.tsx │ │ ├── AnimalDetailsView.tsx │ │ ├── AnimalsView.tsx │ │ ├── HomeView.tsx │ │ ├── NewsView.tsx │ │ ├── NotificationsView.tsx │ │ ├── ShelterDetailsView.tsx │ │ ├── SheltersCreateView.tsx │ │ └── SheltersView.tsx │ ├── index.tsx │ ├── logo.svg │ ├── react-app-env.d.ts │ ├── serviceWorker.ts │ ├── setupTests.ts │ ├── training_black.png │ ├── training_white.png │ ├── v1.css │ └── v2.css │ └── tsconfig.json ├── customer └── quarkus │ ├── .dockerignore │ ├── pom.xml │ └── src │ ├── main │ ├── docker │ │ ├── Dockerfile.jvm │ │ └── Dockerfile.native │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── developer │ │ │ └── demos │ │ │ └── customer │ │ │ └── rest │ │ │ ├── BaggageHeadersFactory.java │ │ │ ├── CustomerResource.java │ │ │ └── PreferenceService.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── redhat │ └── developer │ └── demos │ └── customer │ └── rest │ ├── CustomerResourceTest.java │ └── NativeCustomerResourceIT.java ├── dashboard ├── README.md ├── backend │ ├── .eslintrc │ ├── .gitignore │ ├── Dockerfile │ ├── index.js │ ├── lib │ │ ├── constants.js │ │ └── helpers.js │ ├── package-lock.json │ ├── package.json │ └── yarn.lock ├── frontend │ ├── .eslintrc.json │ ├── .gitignore │ ├── Dockerfile │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── manifest.json │ │ └── robots.txt │ ├── src │ │ ├── App.js │ │ ├── ComponentCard.js │ │ ├── index.css │ │ ├── index.js │ │ └── serviceWorker.js │ └── yarn.lock ├── imgs │ └── frontend.png └── kubefiles │ └── template.yml ├── exchange-application ├── README.md ├── currencies │ ├── .gitignore │ ├── v1 │ │ ├── Dockerfile │ │ ├── requirements.txt │ │ └── src │ │ │ └── currencies.py │ └── v2 │ │ ├── Dockerfile │ │ ├── requirements.txt │ │ └── src │ │ └── currencies.py ├── exchange │ ├── .gitignore │ ├── Dockerfile │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── docker │ │ │ ├── Dockerfile.jvm │ │ │ └── Dockerfile.native │ │ ├── java │ │ │ └── com │ │ │ │ └── redhat │ │ │ │ └── restclient │ │ │ │ ├── CorsFilter.java │ │ │ │ ├── Currency.java │ │ │ │ ├── CurrencyResource.java │ │ │ │ ├── CurrencyService.java │ │ │ │ ├── ExchangeResource.java │ │ │ │ ├── ExchangeService.java │ │ │ │ ├── News.java │ │ │ │ ├── NewsResource.java │ │ │ │ └── NewsService.java │ │ └── resources │ │ │ ├── META-INF │ │ │ └── resources │ │ │ │ └── index.html │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── redhat │ │ └── restclient │ │ └── .gitkeep ├── frontend │ ├── .gitignore │ ├── v1 │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ ├── src │ │ │ ├── App.css │ │ │ ├── App.js │ │ │ ├── Graph.js │ │ │ ├── HistoricalDataForm.js │ │ │ ├── Loading.js │ │ │ ├── MainStructure.js │ │ │ ├── NavList.js │ │ │ ├── NewsBoard.js │ │ │ ├── SingleCurrencyExchange.js │ │ │ ├── Welcome.js │ │ │ ├── index.js │ │ │ ├── serviceWorker.js │ │ │ ├── setupTests.js │ │ │ ├── training_black.png │ │ │ └── training_white.png │ │ └── yarn.lock │ ├── v2 │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ ├── src │ │ │ ├── App.css │ │ │ ├── App.js │ │ │ ├── Graph.js │ │ │ ├── HistoricalDataForm.js │ │ │ ├── Loading.js │ │ │ ├── MainStructure.js │ │ │ ├── NavList.js │ │ │ ├── NewsBoard.js │ │ │ ├── SingleCurrencyExchange.js │ │ │ ├── Welcome.js │ │ │ ├── index.js │ │ │ ├── serviceWorker.js │ │ │ ├── setupTests.js │ │ │ ├── training_black.png │ │ │ └── training_white.png │ │ └── yarn.lock │ ├── v3.1 │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ ├── src │ │ │ ├── App.css │ │ │ ├── App.js │ │ │ ├── FetchUtils.js │ │ │ ├── Graph.js │ │ │ ├── HistoricalDataForm.js │ │ │ ├── Loading.js │ │ │ ├── MainStructure.js │ │ │ ├── NavList.js │ │ │ ├── NewsBoard.js │ │ │ ├── SingleCurrencyExchange.js │ │ │ ├── Welcome.js │ │ │ ├── index.js │ │ │ ├── serviceWorker.js │ │ │ ├── setupTests.js │ │ │ ├── training_black.png │ │ │ └── training_white.png │ │ └── yarn.lock │ └── v3 │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── public │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── robots.txt │ │ ├── src │ │ ├── App.css │ │ ├── App.js │ │ ├── FetchUtils.js │ │ ├── Graph.js │ │ ├── HistoricalDataForm.js │ │ ├── Loading.js │ │ ├── MainStructure.js │ │ ├── NavList.js │ │ ├── NewsBoard.js │ │ ├── SingleCurrencyExchange.js │ │ ├── Welcome.js │ │ ├── index.js │ │ ├── serviceWorker.js │ │ ├── setupTests.js │ │ ├── training_black.png │ │ └── training_white.png │ │ └── yarn.lock ├── history │ ├── .gitignore │ ├── Dockerfile │ ├── index.js │ ├── lib │ │ └── constants.js │ ├── package-lock.json │ ├── package.json │ └── test.json ├── imgs │ └── app.png └── kubefiles │ ├── app-template.yml │ ├── currency.yml │ ├── exchange.yml │ ├── frontend.yml │ ├── history.yml │ ├── istio-exchange.yml │ └── istio-frontend.yml ├── exchange-traced ├── .gitignore ├── README.md ├── currencies │ ├── .gitignore │ ├── Dockerfile │ ├── requirements.txt │ └── src │ │ └── currencies.py ├── exchange │ ├── .gitignore │ ├── Dockerfile │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── redhat │ │ │ │ └── restclient │ │ │ │ ├── CorsFilter.java │ │ │ │ ├── Currency.java │ │ │ │ ├── CurrencyResource.java │ │ │ │ ├── CurrencyService.java │ │ │ │ ├── ExchangeResource.java │ │ │ │ ├── ExchangeService.java │ │ │ │ ├── News.java │ │ │ │ ├── NewsResource.java │ │ │ │ └── NewsService.java │ │ └── resources │ │ │ ├── META-INF │ │ │ └── resources │ │ │ │ └── index.html │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── redhat │ │ └── restclient │ │ └── .gitkeep ├── frontend │ ├── .gitignore │ ├── Dockerfile │ ├── README.md │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── robots.txt │ ├── src │ │ ├── App.css │ │ ├── App.js │ │ ├── Graph.js │ │ ├── HistoricalDataForm.js │ │ ├── Loading.js │ │ ├── MainStructure.js │ │ ├── NavList.js │ │ ├── NewsBoard.js │ │ ├── SingleCurrencyExchange.js │ │ ├── Welcome.js │ │ ├── index.js │ │ ├── serviceWorker.js │ │ ├── setupTests.js │ │ ├── training_black.png │ │ └── training_white.png │ └── yarn.lock └── history │ ├── .gitignore │ ├── Dockerfile │ ├── index.js │ ├── lib │ └── constants.js │ ├── package-lock.json │ ├── package.json │ └── test.json ├── istio-tutorial ├── .gitignore ├── .hasrc ├── .travis.yml ├── LICENSE ├── bin │ ├── install-base-services.sh │ └── install-recommendations-v2.sh ├── customer │ ├── .gitignore │ ├── dotnet │ │ ├── Controllers │ │ │ └── ValuesController.cs │ │ ├── Dockerfile │ │ ├── Program.cs │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── customer.csproj │ │ ├── dotnet.csproj │ │ ├── pub.sh │ │ └── standalone.sh │ ├── java │ │ ├── camel-springboot │ │ │ ├── .gitignore │ │ │ ├── .mvn │ │ │ │ └── wrapper │ │ │ │ │ ├── maven-wrapper.jar │ │ │ │ │ └── maven-wrapper.properties │ │ │ ├── Dockerfile │ │ │ ├── mvnw │ │ │ ├── mvnw.cmd │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── redhat │ │ │ │ │ └── developer │ │ │ │ │ └── demos │ │ │ │ │ ├── CustomerApplication.java │ │ │ │ │ └── CustomerCamelRoute.java │ │ │ │ └── resources │ │ │ │ └── application.properties │ │ ├── microprofile │ │ │ ├── Dockerfile │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── redhat │ │ │ │ │ └── developer │ │ │ │ │ └── demos │ │ │ │ │ └── customer │ │ │ │ │ └── rest │ │ │ │ │ ├── CustomerApplication.java │ │ │ │ │ └── CustomerEndpoint.java │ │ │ │ └── resources │ │ │ │ └── META-INF │ │ │ │ └── microprofile-config.properties │ │ ├── quarkus │ │ │ ├── .dockerignore │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── docker │ │ │ │ │ ├── Dockerfile.jvm │ │ │ │ │ └── Dockerfile.native │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── redhat │ │ │ │ │ │ └── developer │ │ │ │ │ │ └── demos │ │ │ │ │ │ └── customer │ │ │ │ │ │ └── rest │ │ │ │ │ │ ├── BaggageHeadersFactory.java │ │ │ │ │ │ ├── CustomerResource.java │ │ │ │ │ │ └── PreferenceService.java │ │ │ │ └── resources │ │ │ │ │ └── application.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── redhat │ │ │ │ └── developer │ │ │ │ └── demos │ │ │ │ └── customer │ │ │ │ └── rest │ │ │ │ ├── CustomerResourceTest.java │ │ │ │ └── NativeCustomerResourceIT.java │ │ └── springboot │ │ │ ├── .mvn │ │ │ └── wrapper │ │ │ │ ├── maven-wrapper.jar │ │ │ │ └── maven-wrapper.properties │ │ │ ├── Dockerfile │ │ │ ├── mvnw │ │ │ ├── mvnw.cmd │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ ├── src │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── redhat │ │ │ │ │ │ └── developer │ │ │ │ │ │ └── demos │ │ │ │ │ │ └── customer │ │ │ │ │ │ ├── CustomerApplication.java │ │ │ │ │ │ └── CustomerController.java │ │ │ │ └── resources │ │ │ │ │ ├── application-local.properties │ │ │ │ │ └── application.properties │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── redhat │ │ │ │ └── developer │ │ │ │ └── demos │ │ │ │ └── customer │ │ │ │ └── CustomerApplicationTests.java │ │ │ └── trace.png │ ├── kubernetes │ │ ├── Deployment.yml │ │ ├── Deployment_http.yml │ │ ├── Deployment_jvm.yml │ │ ├── Gateway.workshop.yml │ │ ├── Gateway.yml │ │ └── Service.yml │ └── node │ │ ├── Deployment.yml │ │ ├── Dockerfile │ │ ├── Service.yml │ │ ├── customer.js │ │ └── request-module.js ├── dev-site.yml ├── diferencia │ ├── Deployment-noise-detection.yml │ ├── Deployment.yml │ ├── Service.yml │ ├── recommendation-candidate-svc.yml │ ├── recommendation-master-svc.yml │ └── virtual-service-recommendation-v1-diferencia-mirror-v2.yml ├── documentation │ ├── antora.yml │ └── modules │ │ ├── ROOT │ │ ├── _attributes.adoc │ │ ├── assets │ │ │ └── images │ │ │ │ ├── grafana1.png │ │ │ │ ├── grafana2.png │ │ │ │ ├── jaegerUI.png │ │ │ │ ├── keycloak-assign_user_role.png │ │ │ │ ├── keycloak-create_realm.png │ │ │ │ ├── keycloak-create_user.png │ │ │ │ ├── keycloak-details_user.png │ │ │ │ ├── keycloak-import.png │ │ │ │ ├── keycloak-initial.png │ │ │ │ ├── keycloak-jwt_token.png │ │ │ │ ├── kiali-application-details.png │ │ │ │ ├── kiali-application-health.png │ │ │ │ ├── kiali-application-list.png │ │ │ │ ├── kiali-application-metrics.png │ │ │ │ ├── kiali-deployments.png │ │ │ │ ├── kiali-distributed-tracing.png │ │ │ │ ├── kiali-istio-config.png │ │ │ │ ├── kiali-login.png │ │ │ │ ├── kiali-retry.png │ │ │ │ ├── kiali-service-details.png │ │ │ │ ├── kiali-service-graph.png │ │ │ │ ├── kiali-service-health.png │ │ │ │ ├── kiali-service-list-2.png │ │ │ │ ├── kiali-service-list.png │ │ │ │ ├── kiali-source-services.png │ │ │ │ ├── kiali-virtual-services-2.png │ │ │ │ ├── kiali-virtual-services.png │ │ │ │ ├── kiali-workload-details.png │ │ │ │ ├── kiali-workload-list.png │ │ │ │ ├── prometheus-memory.png │ │ │ │ ├── prometheus_custom_metric.png │ │ │ │ ├── siege_cb_503.png │ │ │ │ └── siege_ok.png │ │ ├── nav.adoc │ │ └── pages │ │ │ ├── 1setup.adoc │ │ │ ├── 2build-microservices.adoc │ │ │ ├── 2deploy-microservices.adoc │ │ │ ├── 3kiali.adoc │ │ │ ├── 3monitoring-tracing.adoc │ │ │ ├── 4advanced-routerules.adoc │ │ │ ├── 4simple-routerules.adoc │ │ │ ├── 5circuit-breaker.adoc │ │ │ ├── 6fault-injection.adoc │ │ │ ├── 7policy.adoc │ │ │ ├── 8acl.adoc │ │ │ ├── 8egress.adoc │ │ │ ├── 8jwt.adoc │ │ │ ├── 8mTLS.adoc │ │ │ ├── 8rbac.adoc │ │ │ ├── 9tips.adoc │ │ │ ├── _attributes.adoc │ │ │ └── index.adoc │ │ ├── advanced │ │ ├── assets │ │ │ └── images │ │ │ │ ├── arquillian_cube.png │ │ │ │ ├── diferencia-noise.png │ │ │ │ ├── diferencia-simple.png │ │ │ │ └── promotion-osio.png │ │ ├── nav.adoc │ │ └── pages │ │ │ ├── _attributes.adoc │ │ │ ├── cube.adoc │ │ │ ├── diferencia.adoc │ │ │ ├── index.adoc │ │ │ ├── promotion.adoc │ │ │ ├── virtualization.adoc │ │ │ └── zero-downtime-database.adoc │ │ └── workshop │ │ ├── examples │ │ └── istio-install.yaml │ │ └── pages │ │ ├── 1setup.adoc │ │ └── 2deploy-microservices.adoc ├── generate_dev.sh ├── generate_docs.sh ├── generate_workshop.sh ├── istiofiles │ ├── acl-blacklist.yml │ ├── acl-deny-except-customer2preference2recommendation.yml │ ├── acl-whitelist.yml │ ├── authentication-enable-tls.yml │ ├── authorization-enable-rbac.yml │ ├── destination-rule-recommendation-v1-v2-v3.yml │ ├── destination-rule-recommendation-v1-v2.yml │ ├── destination-rule-recommendation-v1.yml │ ├── destination-rule-recommendation-v4-v5-v6-v7.yml │ ├── destination-rule-recommendation.yml │ ├── destination-rule-recommendation_cb_policy_pool_ejection.yml │ ├── destination-rule-recommendation_cb_policy_version_v2.yml │ ├── destination-rule-recommendation_lb_policy_app.yml │ ├── destination-rule-tls.yml │ ├── disable-mtls.yml │ ├── enduser-authentication-jwt.yml │ ├── namespace-rbac-policy-jwt.yml │ ├── namespace-rbac-policy.yml │ ├── rate_limit_rule.yml │ ├── recommendation_rate_limit_handler.yml │ ├── recommendation_requestcount.yml │ ├── service-entry-egress-worldclockapi.yml │ ├── virtual-service-firefox-recommendation-v2.yml │ ├── virtual-service-mobile-recommendation-v2.yml │ ├── virtual-service-promoted-v3.yml │ ├── virtual-service-promotion-v1-v2-v3.yml │ ├── virtual-service-recommendation-503.yml │ ├── virtual-service-recommendation-delay.yml │ ├── virtual-service-recommendation-timeout.yml │ ├── virtual-service-recommendation-v1-mirror-v2.yml │ ├── virtual-service-recommendation-v1.yml │ ├── virtual-service-recommendation-v1_and_v2.yml │ ├── virtual-service-recommendation-v1_and_v2_50_50.yml │ ├── virtual-service-recommendation-v1_and_v2_75_25.yml │ ├── virtual-service-recommendation-v2.yml │ ├── virtual-service-recommendation-v2_retry.yml │ ├── virtual-service-recommendation-v3.yml │ ├── virtual-service-recommendation-v4.yml │ ├── virtual-service-recommendation-v5.yml │ ├── virtual-service-recommendation-v6.yml │ ├── virtual-service-recommendation-v7.yml │ ├── virtual-service-recommendation-virtualized.yml │ └── virtual-service-safari-recommendation-v2.yml ├── keycloak │ ├── Deployment.yml │ ├── Service.yml │ └── istio-realm.json ├── preference │ ├── .gitignore │ ├── dotnet │ │ ├── Controllers │ │ │ └── ValuesController.cs │ │ ├── Dockerfile │ │ ├── Program.cs │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── dotnet.csproj │ │ ├── pub.sh │ │ └── standalone.sh │ ├── java │ │ ├── camel-springboot │ │ │ ├── .gitignore │ │ │ ├── .mvn │ │ │ │ └── wrapper │ │ │ │ │ ├── maven-wrapper.jar │ │ │ │ │ └── maven-wrapper.properties │ │ │ ├── Dockerfile │ │ │ ├── mvnw │ │ │ ├── mvnw.cmd │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── redhat │ │ │ │ │ └── developer │ │ │ │ │ └── demos │ │ │ │ │ ├── PreferenceApplication.java │ │ │ │ │ └── PreferenceCamelRoute.java │ │ │ │ └── resources │ │ │ │ └── application.properties │ │ ├── microprofile │ │ │ ├── Dockerfile │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── redhat │ │ │ │ │ └── developer │ │ │ │ │ └── demos │ │ │ │ │ └── preference │ │ │ │ │ └── rest │ │ │ │ │ ├── PreferenceApplication.java │ │ │ │ │ └── PreferenceEndpoint.java │ │ │ │ └── resources │ │ │ │ └── META-INF │ │ │ │ └── microprofile-config.properties │ │ ├── quarkus │ │ │ ├── .dockerignore │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── docker │ │ │ │ │ ├── Dockerfile.jvm │ │ │ │ │ └── Dockerfile.native │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── redhat │ │ │ │ │ │ └── developer │ │ │ │ │ │ └── demos │ │ │ │ │ │ └── preference │ │ │ │ │ │ └── rest │ │ │ │ │ │ ├── BaggageHeadersFactory.java │ │ │ │ │ │ ├── PreferenceResource.java │ │ │ │ │ │ └── RecommendationService.java │ │ │ │ └── resources │ │ │ │ │ └── application.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── redhat │ │ │ │ └── developer │ │ │ │ └── demos │ │ │ │ └── preference │ │ │ │ └── rest │ │ │ │ ├── NativePreferenceResourceIT.java │ │ │ │ └── PreferenceResourceTest.java │ │ └── springboot │ │ │ ├── .mvn │ │ │ └── wrapper │ │ │ │ ├── maven-wrapper.jar │ │ │ │ └── maven-wrapper.properties │ │ │ ├── Dockerfile │ │ │ ├── mvnw │ │ │ ├── mvnw.cmd │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ ├── src │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── redhat │ │ │ │ │ │ └── developer │ │ │ │ │ │ └── demos │ │ │ │ │ │ └── preference │ │ │ │ │ │ ├── PreferencesApplication.java │ │ │ │ │ │ └── PreferencesController.java │ │ │ │ └── resources │ │ │ │ │ ├── application-local.properties │ │ │ │ │ └── application.properties │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── redhat │ │ │ │ └── developer │ │ │ │ └── demos │ │ │ │ └── preference │ │ │ │ └── PreferencesApplicationTests.java │ │ │ └── trace.png │ ├── kubernetes │ │ ├── Deployment.yml │ │ ├── Deployment_http.yml │ │ ├── Deployment_jvm.yml │ │ └── Service.yml │ └── node │ │ ├── Deployment.yml │ │ ├── Dockerfile │ │ ├── Service.yml │ │ └── preference.js ├── readme.adoc ├── recommendation │ ├── .gitignore │ ├── java │ │ ├── camel-springboot │ │ │ ├── .gitignore │ │ │ ├── .mvn │ │ │ │ └── wrapper │ │ │ │ │ ├── maven-wrapper.jar │ │ │ │ │ └── maven-wrapper.properties │ │ │ ├── Dockerfile │ │ │ ├── mvnw │ │ │ ├── mvnw.cmd │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── redhat │ │ │ │ │ └── developer │ │ │ │ │ └── demos │ │ │ │ │ ├── RecommendationApplication.java │ │ │ │ │ └── RecommendationCamelRoute.java │ │ │ │ └── resources │ │ │ │ └── application.properties │ │ ├── microprofile │ │ │ ├── Dockerfile │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── redhat │ │ │ │ └── developer │ │ │ │ └── demos │ │ │ │ └── recommendation │ │ │ │ └── rest │ │ │ │ ├── RecommendationApplication.java │ │ │ │ └── RecommendationEndpoint.java │ │ ├── quarkus │ │ │ ├── .dockerignore │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── docker │ │ │ │ │ ├── Dockerfile.jvm │ │ │ │ │ └── Dockerfile.native │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── redhat │ │ │ │ │ └── developer │ │ │ │ │ └── demos │ │ │ │ │ └── recommendation │ │ │ │ │ └── rest │ │ │ │ │ └── RecommendationResource.java │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── redhat │ │ │ │ └── developer │ │ │ │ └── demos │ │ │ │ └── recommendation │ │ │ │ └── rest │ │ │ │ ├── NativeRecommendationResourceIT.java │ │ │ │ └── RecommendationResourceTest.java │ │ ├── springboot │ │ │ ├── .gitkeep │ │ │ ├── Dockerfile │ │ │ ├── mvnw │ │ │ ├── mvnw.bat │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── redhat │ │ │ │ │ └── developer │ │ │ │ │ └── demos │ │ │ │ │ └── recommendation │ │ │ │ │ ├── RecommendationApplication.java │ │ │ │ │ └── RecommendationController.java │ │ │ │ └── resources │ │ │ │ ├── application-local.properties │ │ │ │ └── application.properties │ │ └── vertx │ │ │ ├── .mvn │ │ │ └── wrapper │ │ │ │ ├── maven-wrapper.jar │ │ │ │ └── maven-wrapper.properties │ │ │ ├── Dockerfile │ │ │ ├── maven │ │ │ └── wrapper │ │ │ │ ├── maven-wrapper.jar │ │ │ │ └── maven-wrapper.properties │ │ │ ├── mvnw │ │ │ ├── mvnw.bat │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── redhat │ │ │ │ │ └── developer │ │ │ │ │ └── demos │ │ │ │ │ └── recommendation │ │ │ │ │ ├── RecommendationPersistenceVerticle.java │ │ │ │ │ └── RecommendationVerticle.java │ │ │ ├── resources │ │ │ │ └── db │ │ │ │ │ └── migration │ │ │ │ │ └── V1__Create_recommendation_table.sql │ │ │ └── sql │ │ │ │ ├── V2__Add_movie_column_in_recommendation_table.sql │ │ │ │ ├── V3__Update_recommendation_data.sql │ │ │ │ └── V4__Update_movie_name_constraints.sql │ │ │ └── test │ │ │ ├── java │ │ │ └── com │ │ │ │ └── redhat │ │ │ │ └── developer │ │ │ │ └── demos │ │ │ │ └── recommendation │ │ │ │ ├── DarkLaunchIT.java │ │ │ │ └── RecommendationVerticleTest.java │ │ │ └── resources │ │ │ ├── arquillian.xml │ │ │ ├── dark-launch-redirect-traffic-to-new-version.yml │ │ │ └── virtual-service-recommendation-v1.yml │ ├── kubernetes │ │ ├── Deployment-v2-timeout.yml │ │ ├── Deployment-v2-timeout_jvm.yml │ │ ├── Deployment-v2.yml │ │ ├── Deployment-v2_http.yml │ │ ├── Deployment-v2_jvm.yml │ │ ├── Deployment-v3.yml │ │ ├── Deployment-v3_jvm.yml │ │ ├── Deployment-v4.yml │ │ ├── Deployment-v5.yml │ │ ├── Deployment-v6.yml │ │ ├── Deployment-v7.yml │ │ ├── Deployment-virtualized.yml │ │ ├── Deployment.yml │ │ ├── Deployment_http.yml │ │ ├── Deployment_jvm.yml │ │ ├── PostgreSQL-deployment.yml │ │ ├── PostgreSQL-service.yml │ │ └── Service.yml │ ├── node │ │ ├── Deployment-v2.yml │ │ ├── Deployment.yml │ │ ├── Dockerfile │ │ ├── Service.yml │ │ └── recommendation.js │ └── virtualized │ │ ├── Dockerfile │ │ └── simulation.json ├── scripts │ ├── blue-green-recommendation-v1.sh │ ├── blue-green-recommendation-v2.sh │ ├── canary-75-25.sh │ ├── canary-90-10.sh │ ├── canary-user-agent.sh │ ├── clean.sh │ ├── darklaunch.sh │ ├── delay.sh │ ├── egress-access.sh │ ├── egress-setup.sh │ ├── error-503-50.sh │ ├── pool-ejection.sh │ ├── retry-fail.sh │ ├── retry-fix.sh │ └── run.sh ├── site-gh-pages.yml ├── site-workshop.yml └── supplemental-ui │ ├── img │ └── favicon.ico │ └── partials │ ├── footer-content.hbs │ ├── head-meta.hbs │ └── header-content.hbs ├── kiali-ge ├── .gitignore ├── czech │ ├── Dockerfile │ ├── LICENSE │ ├── README.md │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── training │ │ │ └── czech │ │ │ └── CzechService.java │ │ └── resources │ │ └── application.properties ├── english-v1 │ ├── Dockerfile │ ├── LICENSE │ ├── README.md │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── training │ │ │ └── english │ │ │ ├── EnglishService.java │ │ │ └── SpanishService.java │ │ └── resources │ │ └── application.properties ├── english-v2 │ ├── Dockerfile │ ├── LICENSE │ ├── README.md │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── training │ │ │ └── english │ │ │ ├── EnglishService.java │ │ │ └── SpanishService.java │ │ └── resources │ │ └── application.properties ├── greet-api │ ├── Dockerfile │ ├── LICENSE │ ├── README.md │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── training │ │ │ └── api │ │ │ ├── APIGatewayService.java │ │ │ ├── CzechService.java │ │ │ ├── EnglishService.java │ │ │ └── SpanishService.java │ │ └── resources │ │ └── application.properties └── spanish │ ├── Dockerfile │ ├── LICENSE │ ├── README.md │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── com │ │ └── redhat │ │ └── training │ │ └── spanish │ │ ├── CzechService.java │ │ └── SpanishService.java │ └── resources │ └── application.properties ├── maven-simplest-v2 ├── Dockerfile ├── README.adoc ├── pom.xml └── src │ └── main │ └── java │ └── io │ └── vertx │ └── example │ └── HelloRedHatEmbedded.java ├── maven-simplest ├── Dockerfile ├── README.adoc ├── pom.xml └── src │ └── main │ └── java │ └── io │ └── vertx │ └── example │ └── HelloWorldEmbedded.java ├── metrics-ge ├── order │ ├── .gitignore │ ├── Dockerfile │ ├── LICENSE │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── training │ │ │ └── order │ │ │ └── OrderService.java │ │ └── resources │ │ └── application.properties └── product │ ├── .dockerignore │ ├── .gitignore │ ├── Dockerfile │ ├── package-lock.json │ ├── package.json │ └── server.js ├── payments ├── gateway-v1 │ ├── Dockerfile │ ├── LICENSE │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── training │ │ │ └── gateway │ │ │ └── PaymentGatewayResource.java │ │ └── resources │ │ └── application.properties ├── gateway-v2 │ ├── Dockerfile │ ├── LICENSE │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── training │ │ │ └── gateway │ │ │ └── PaymentGatewayResource.java │ │ └── resources │ │ └── application.properties ├── payment-v1 │ ├── Dockerfile │ ├── LICENSE │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── training │ │ │ └── payment │ │ │ ├── PaymentGatewayService.java │ │ │ └── PaymentResource.java │ │ └── resources │ │ └── application.properties └── payment-v2 │ ├── Dockerfile │ ├── LICENSE │ ├── README.md │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── com │ │ └── redhat │ │ └── training │ │ └── payment │ │ ├── PaymentGatewayService.java │ │ └── PaymentResource.java │ └── resources │ └── application.properties ├── preference └── quarkus │ ├── .dockerignore │ ├── pom.xml │ └── src │ ├── main │ ├── docker │ │ ├── Dockerfile.jvm │ │ └── Dockerfile.native │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── developer │ │ │ └── demos │ │ │ └── preference │ │ │ └── rest │ │ │ ├── BaggageHeadersFactory.java │ │ │ ├── PreferenceResource.java │ │ │ └── RecommendationService.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── redhat │ └── developer │ └── demos │ └── preference │ └── rest │ ├── NativePreferenceResourceIT.java │ └── PreferenceResourceTest.java ├── python-flask-ab-proxy ├── .gitignore ├── Dockerfile ├── README.md ├── requirements.txt └── src │ ├── ab-proxy.py │ └── data │ └── headers.json ├── python-flask-gossip ├── .gitignore ├── v1 │ ├── Dockerfile │ ├── README.md │ ├── kubefiles │ │ └── gossip-application.yml │ ├── requirements.txt │ └── src │ │ ├── data │ │ └── finance.json │ │ └── gossip.py └── v2 │ ├── Dockerfile │ ├── README.md │ ├── kubefiles │ └── gossip-application.yml │ ├── requirements.txt │ └── src │ ├── data │ ├── finance.json │ └── puppies.json │ └── gossip.py ├── quarkus-calculator ├── .dockerignore ├── .gitignore ├── pom.xml ├── quarkus-adder │ ├── .dockerignore │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── Dockerfile.distroless.native │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── docker │ │ │ ├── Dockerfile.jvm │ │ │ └── Dockerfile.native │ │ ├── java │ │ │ └── com │ │ │ │ └── redhat │ │ │ │ └── training │ │ │ │ ├── AdderResource.java │ │ │ │ ├── DataHealthCheck.java │ │ │ │ └── service │ │ │ │ ├── AdderService.java │ │ │ │ └── SolverService.java │ │ └── resources │ │ │ ├── META-INF │ │ │ └── resources │ │ │ │ └── index.html │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── redhat │ │ └── training │ │ └── AdderResourceTest.java ├── quarkus-multiplier │ ├── .dockerignore │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── Dockerfile.distroless.native │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── docker │ │ │ ├── Dockerfile.jvm │ │ │ └── Dockerfile.native │ │ ├── java │ │ │ └── com │ │ │ │ └── redhat │ │ │ │ └── training │ │ │ │ ├── DataHealthCheck.java │ │ │ │ ├── MultiplierResource.java │ │ │ │ └── service │ │ │ │ ├── MultiplierService.java │ │ │ │ └── SolverService.java │ │ └── resources │ │ │ ├── META-INF │ │ │ └── resources │ │ │ │ └── index.html │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── redhat │ │ └── training │ │ └── MultiplierResourceTest.java └── quarkus-solver │ ├── .dockerignore │ ├── .gitignore │ ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties │ ├── Dockerfile.distroless.native │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ ├── main │ ├── docker │ │ ├── Dockerfile.jvm │ │ └── Dockerfile.native │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── training │ │ │ ├── DataHealthCheck.java │ │ │ ├── SolverResource.java │ │ │ └── service │ │ │ ├── AdderService.java │ │ │ ├── MultiplierService.java │ │ │ └── SolverService.java │ └── resources │ │ ├── META-INF │ │ └── resources │ │ │ └── index.html │ │ └── application.properties │ └── test │ └── java │ └── com │ └── redhat │ └── training │ └── SolverResourceTest.java ├── recommendation └── quarkus │ ├── .dockerignore │ ├── pom.xml │ └── src │ ├── main │ ├── docker │ │ ├── Dockerfile.jvm │ │ └── Dockerfile.native │ └── java │ │ └── com │ │ └── redhat │ │ └── developer │ │ └── demos │ │ └── recommendation │ │ └── rest │ │ └── RecommendationResource.java │ └── test │ └── java │ └── com │ └── redhat │ └── developer │ └── demos │ └── recommendation │ └── rest │ ├── NativeRecommendationResourceIT.java │ └── RecommendationResourceTest.java ├── sleep └── Dockerfile ├── tracing-ge ├── .gitignore ├── servicea │ ├── .dockerignore │ ├── Dockerfile │ ├── HttpServer.js │ ├── Services │ │ ├── RestClient.js │ │ └── ServiceB.js │ ├── Tracer.js │ ├── index.js │ ├── package-lock.json │ └── package.json └── serviceb │ ├── Dockerfile │ ├── LICENSE │ ├── README.md │ ├── package-lock.json │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── com │ │ └── redhat │ │ └── training │ │ └── serviceb │ │ └── ServiceB.java │ └── resources │ └── application.properties └── vertx-greet ├── .gitignore ├── Dockerfile ├── README.adoc ├── pom.xml └── src └── main └── java └── io └── vertx └── greet ├── GreetMain.java └── GreetServer.java /.gitignore: -------------------------------------------------------------------------------- 1 | */.settings 2 | */target 3 | */.classpath 4 | */.project 5 | .idea* 6 | .vscode 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DO328 Application Repository 2 | 3 | This repository contains applications used in the Red Hat training DO328 - 4 | Building Resilient Microservices with Red Hat Service Mesh. 5 | 6 | ## Issues 7 | 8 | Should you find any issues with the course applications, or have any general 9 | questions, file a new [issue](https://github.com/RedHatTraining/DO328-apps/issues/new). 10 | -------------------------------------------------------------------------------- /adopt-a-pup/adoption-service/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /adopt-a-pup/adoption-service/src/main/java/com/redhat/do328/adoptApup/adoptionservice/model/AdoptionApplicationResponse.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.adoptionservice.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @AllArgsConstructor 8 | @NoArgsConstructor 9 | @Data 10 | public class AdoptionApplicationResponse { 11 | private Status status; 12 | private String message; 13 | } 14 | -------------------------------------------------------------------------------- /adopt-a-pup/adoption-service/src/main/java/com/redhat/do328/adoptApup/adoptionservice/model/AnimalSize.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.adoptionservice.model; 2 | 3 | public enum AnimalSize { 4 | S, 5 | M, 6 | L 7 | } 8 | -------------------------------------------------------------------------------- /adopt-a-pup/adoption-service/src/main/java/com/redhat/do328/adoptApup/adoptionservice/model/AnimalStatusChangeRequest.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.adoptionservice.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @AllArgsConstructor 8 | @NoArgsConstructor 9 | @Data 10 | public class AnimalStatusChangeRequest { 11 | private boolean newAdoptableStatus; 12 | } 13 | -------------------------------------------------------------------------------- /adopt-a-pup/adoption-service/src/main/java/com/redhat/do328/adoptApup/adoptionservice/model/Email.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.adoptionservice.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @AllArgsConstructor 8 | @NoArgsConstructor 9 | @Data 10 | public class Email { 11 | private String message; 12 | private String subject; 13 | } 14 | -------------------------------------------------------------------------------- /adopt-a-pup/adoption-service/src/main/java/com/redhat/do328/adoptApup/adoptionservice/model/EmailNotificationRequest.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.adoptionservice.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.util.Map; 8 | 9 | @AllArgsConstructor 10 | @NoArgsConstructor 11 | @Data 12 | public class EmailNotificationRequest { 13 | private Map messagesByEmail; 14 | } 15 | -------------------------------------------------------------------------------- /adopt-a-pup/adoption-service/src/main/java/com/redhat/do328/adoptApup/adoptionservice/model/Residency.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.adoptionservice.model; 2 | 3 | public enum Residency { 4 | APARTMENT, 5 | HOUSE 6 | } 7 | -------------------------------------------------------------------------------- /adopt-a-pup/adoption-service/src/main/java/com/redhat/do328/adoptApup/adoptionservice/model/Shelter.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.adoptionservice.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @AllArgsConstructor 8 | @NoArgsConstructor 9 | @Data 10 | public class Shelter { 11 | private String shelterId; 12 | private String shelterName; 13 | private String state; 14 | private String country; 15 | private String address; 16 | private String email; 17 | private String phoneNumber; 18 | } 19 | -------------------------------------------------------------------------------- /adopt-a-pup/adoption-service/src/main/java/com/redhat/do328/adoptApup/adoptionservice/model/Status.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.adoptionservice.model; 2 | 3 | public enum Status { 4 | APPROVED, 5 | DENIED 6 | } 7 | -------------------------------------------------------------------------------- /adopt-a-pup/adoption-service/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | notificationService.host=http://notification:8080 2 | animalService.host=http://animal:8080 3 | shelterService.host=http://shelter:8080 4 | -------------------------------------------------------------------------------- /adopt-a-pup/adoption-service/src/main/resources/templates/applicationApproval.st: -------------------------------------------------------------------------------- 1 | Hello , 2 | 3 | Congratulations, your application for has been approved! 4 | 5 | You may contact the shelter at or to finalize the process. 6 | 7 | is waiting patiently for you. Thank you for using Adopt-A-Pup! -------------------------------------------------------------------------------- /adopt-a-pup/animal-service/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /adopt-a-pup/animal-service/src/main/java/com/redhat/do328/adoptApup/animalservice/dao/AnimalNotificationSubscriptionRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.animalservice.dao; 2 | 3 | import com.redhat.do328.adoptApup.animalservice.model.AnimalNotificationRequestCriteria; 4 | import org.springframework.data.repository.PagingAndSortingRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface AnimalNotificationSubscriptionRepository extends PagingAndSortingRepository { 9 | List findAll(); 10 | } 11 | -------------------------------------------------------------------------------- /adopt-a-pup/animal-service/src/main/java/com/redhat/do328/adoptApup/animalservice/dao/AnimalRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.animalservice.dao; 2 | 3 | import com.redhat.do328.adoptApup.animalservice.model.Animal; 4 | import org.springframework.data.repository.PagingAndSortingRepository; 5 | 6 | import java.util.List; 7 | 8 | 9 | public interface AnimalRepository extends PagingAndSortingRepository { 10 | List findAll(); 11 | List findAllByAdoptable(boolean isAdoptable); 12 | } 13 | -------------------------------------------------------------------------------- /adopt-a-pup/animal-service/src/main/java/com/redhat/do328/adoptApup/animalservice/model/AnimalSize.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.animalservice.model; 2 | 3 | public enum AnimalSize { 4 | S, 5 | M, 6 | L 7 | } 8 | -------------------------------------------------------------------------------- /adopt-a-pup/animal-service/src/main/java/com/redhat/do328/adoptApup/animalservice/model/AnimalStatusChangeRequest.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.animalservice.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @AllArgsConstructor 8 | @NoArgsConstructor 9 | @Data 10 | public class AnimalStatusChangeRequest { 11 | private boolean newAdoptableStatus; 12 | } 13 | -------------------------------------------------------------------------------- /adopt-a-pup/animal-service/src/main/java/com/redhat/do328/adoptApup/animalservice/model/Email.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.animalservice.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @AllArgsConstructor 8 | @NoArgsConstructor 9 | @Data 10 | public class Email { 11 | private String message; 12 | private String subject; 13 | } 14 | -------------------------------------------------------------------------------- /adopt-a-pup/animal-service/src/main/java/com/redhat/do328/adoptApup/animalservice/model/EmailNotificationRequest.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.animalservice.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.util.Map; 8 | 9 | @AllArgsConstructor 10 | @NoArgsConstructor 11 | @Data 12 | public class EmailNotificationRequest { 13 | private Map messagesByEmail; 14 | } 15 | -------------------------------------------------------------------------------- /adopt-a-pup/animal-service/src/main/java/com/redhat/do328/adoptApup/animalservice/model/Residency.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.animalservice.model; 2 | 3 | public enum Residency { 4 | APARTMENT, 5 | HOUSE 6 | } 7 | -------------------------------------------------------------------------------- /adopt-a-pup/animal-service/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | notificationService.host=http://notification:8080 2 | spring.data.mongodb.host=mongodb 3 | spring.data.mongodb.database=adopt-a-pup 4 | spring.data.mongodb.password=developer 5 | spring.data.mongodb.username=developer 6 | -------------------------------------------------------------------------------- /adopt-a-pup/animal-service/src/main/resources/templates/animalNotificationRequest.st: -------------------------------------------------------------------------------- 1 | Hello , 2 | 3 | An animal matching your notification subscription for 4 | - breed: 5 | - weight: - 6 | - approximateSize: 7 | has been added to our system. 8 | 9 | is awaiting adoption and can be found with the following link: /animals/ -------------------------------------------------------------------------------- /adopt-a-pup/kubefiles/service-mesh.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: Gateway 3 | metadata: 4 | name: adoptapup-gateway 5 | spec: 6 | selector: 7 | istio: ingressgateway 8 | servers: 9 | - port: 10 | number: 80 11 | name: http 12 | protocol: HTTP 13 | hosts: 14 | - "*" -------------------------------------------------------------------------------- /adopt-a-pup/mongo-data/dog-photos/Gus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/mongo-data/dog-photos/Gus.jpg -------------------------------------------------------------------------------- /adopt-a-pup/mongo-data/dog-photos/Harvey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/mongo-data/dog-photos/Harvey.jpg -------------------------------------------------------------------------------- /adopt-a-pup/mongo-data/dog-photos/Theo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/mongo-data/dog-photos/Theo.jpg -------------------------------------------------------------------------------- /adopt-a-pup/mongo-data/dog-photos/Winston.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/mongo-data/dog-photos/Winston.jpg -------------------------------------------------------------------------------- /adopt-a-pup/mongo-data/shelters.mongo: -------------------------------------------------------------------------------- 1 | {"_id":"e038ae3c-592f-403e-9233-4b6eeab30e3c","shelterName":"Denver Doggos","state":"Colorado","country":"US","address":"123 N Pupper St","email":"admin@denverdoggos.com","phoneNumber":"303-123-4567","_class":"com.redhat.do328.adoptApup.shelterservice.model.Shelter"} 2 | {"_id":"6a432062-96a4-4a66-b888-1ab7225e6b2c","shelterName":"Minneapolis Mutts","state":"Minnesota","country":"US","address":"200 Good Boy Ave","email":"frontdesk@minneapolismutts.com","phoneNumber":"212-555-9758","_class":"com.redhat.do328.adoptApup.shelterservice.model.Shelter"} 3 | -------------------------------------------------------------------------------- /adopt-a-pup/notification-service/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /adopt-a-pup/notification-service/src/main/java/com/redhat/do328/adoptApup/notificationservice/models/ApplicationNotification.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.notificationservice.models; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.util.UUID; 8 | 9 | @AllArgsConstructor 10 | @NoArgsConstructor 11 | @Data 12 | public class ApplicationNotification { 13 | private String username; 14 | private String email; 15 | private UUID animalId; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /adopt-a-pup/notification-service/src/main/java/com/redhat/do328/adoptApup/notificationservice/models/Email.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.notificationservice.models; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @AllArgsConstructor 8 | @NoArgsConstructor 9 | @Data 10 | public class Email { 11 | private String message; 12 | private String subject; 13 | } 14 | -------------------------------------------------------------------------------- /adopt-a-pup/notification-service/src/main/java/com/redhat/do328/adoptApup/notificationservice/models/EmailNotificationRequest.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.notificationservice.models; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.util.Map; 8 | 9 | @AllArgsConstructor 10 | @NoArgsConstructor 11 | @Data 12 | public class EmailNotificationRequest { 13 | private Map messagesByEmail; 14 | } 15 | -------------------------------------------------------------------------------- /adopt-a-pup/notification-service/src/main/java/com/redhat/do328/adoptApup/notificationservice/models/NotificationStatusResponse.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.notificationservice.models; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @AllArgsConstructor 8 | @NoArgsConstructor 9 | @Data 10 | public class NotificationStatusResponse { 11 | private Status status; 12 | } 13 | -------------------------------------------------------------------------------- /adopt-a-pup/notification-service/src/main/java/com/redhat/do328/adoptApup/notificationservice/models/SearchNotification.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.notificationservice.models; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @AllArgsConstructor 8 | @NoArgsConstructor 9 | @Data 10 | public class SearchNotification { 11 | private String username; 12 | private String email; 13 | private String breed; 14 | private String weight; 15 | } 16 | -------------------------------------------------------------------------------- /adopt-a-pup/notification-service/src/main/java/com/redhat/do328/adoptApup/notificationservice/models/Status.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.notificationservice.models; 2 | 3 | public enum Status { 4 | SUCCESS, 5 | FAILURE 6 | } 7 | -------------------------------------------------------------------------------- /adopt-a-pup/notification-service/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.mail.host=email 2 | spring.mail.port=25 3 | spring.mail.properties.mail.transport.protocol=smtp 4 | -------------------------------------------------------------------------------- /adopt-a-pup/raw-images/README.md: -------------------------------------------------------------------------------- 1 | # Raw images for adoptapup 2 | 3 | These raw images serve as the image source for the adoptapup web application. 4 | -------------------------------------------------------------------------------- /adopt-a-pup/raw-images/barney.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/raw-images/barney.jpg -------------------------------------------------------------------------------- /adopt-a-pup/raw-images/darwin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/raw-images/darwin.jpg -------------------------------------------------------------------------------- /adopt-a-pup/raw-images/gus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/raw-images/gus.jpg -------------------------------------------------------------------------------- /adopt-a-pup/raw-images/theo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/raw-images/theo.jpg -------------------------------------------------------------------------------- /adopt-a-pup/raw-images/winston.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/raw-images/winston.jpg -------------------------------------------------------------------------------- /adopt-a-pup/shelter-service/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /adopt-a-pup/shelter-service/src/main/java/com/redhat/do328/adoptApup/shelterservice/dao/ShelterDao.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.shelterservice.dao; 2 | 3 | import com.redhat.do328.adoptApup.shelterservice.model.Shelter; 4 | import org.springframework.data.repository.PagingAndSortingRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface ShelterDao extends PagingAndSortingRepository { 9 | List findAll(); 10 | } 11 | -------------------------------------------------------------------------------- /adopt-a-pup/shelter-service/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.data.mongodb.host=mongodb 2 | spring.data.mongodb.database=adopt-a-pup 3 | spring.data.mongodb.password=developer 4 | spring.data.mongodb.username=developer -------------------------------------------------------------------------------- /adopt-a-pup/user-service/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /adopt-a-pup/user-service/src/main/java/com/redhat/do328/adoptApup/userservice/dao/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.userservice.dao; 2 | 3 | import com.redhat.do328.adoptApup.userservice.model.User; 4 | import org.springframework.data.repository.PagingAndSortingRepository; 5 | 6 | public interface UserRepository extends PagingAndSortingRepository { 7 | User findByUsername(String username); 8 | } 9 | -------------------------------------------------------------------------------- /adopt-a-pup/user-service/src/main/resources/application.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/user-service/src/main/resources/application.properties -------------------------------------------------------------------------------- /adopt-a-pup/user-service/src/test/java/com/redhat/do328/adoptApup/userservice/UserServiceApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.redhat.do328.adoptApup.userservice; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class UserServiceApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/.env.example: -------------------------------------------------------------------------------- 1 | # Env for React app 2 | REACT_APP_ADOPTION_SERVICE_URL=http://localhost:8080 3 | REACT_APP_ANIMAL_SERVICE_URL=http://localhost:8081 4 | REACT_APP_SHELTER_SERVICE_URL=http://localhost:8082 5 | REACT_APP_NEWS_ENABLED=1 6 | REACT_APP_NEWS_SERVICE_URL=/frontend 7 | REACT_APP_EMAIL_APP_URL=http://email-adoptapup.apps.ocp4.example.com/ 8 | 9 | # Env for backend (server.js) 10 | BACKEND_NEWS_SERVICE_URL=http://localhost:5000 11 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | 26 | .env -------------------------------------------------------------------------------- /adopt-a-pup/web-app/config/jest/cssTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // This is a custom Jest transformer turning style imports into empty objects. 4 | // http://facebook.github.io/jest/docs/en/webpack.html 5 | 6 | module.exports = { 7 | process() { 8 | return 'module.exports = {};'; 9 | }, 10 | getCacheKey() { 11 | // The output is always the same. 12 | return 'cssTransform'; 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/web-app/public/favicon.ico -------------------------------------------------------------------------------- /adopt-a-pup/web-app/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/web-app/public/logo192.png -------------------------------------------------------------------------------- /adopt-a-pup/web-app/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/web-app/public/logo512.png -------------------------------------------------------------------------------- /adopt-a-pup/web-app/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "DO328 Adopt a Pup App", 3 | "name": "DO328 Adopt a Pup App", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/public/photos/a1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/web-app/public/photos/a1.jpeg -------------------------------------------------------------------------------- /adopt-a-pup/web-app/public/photos/a89cd4fc-16ce-4b51-8dd1-866d7d793322.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/web-app/public/photos/a89cd4fc-16ce-4b51-8dd1-866d7d793322.jpeg -------------------------------------------------------------------------------- /adopt-a-pup/web-app/public/photos/aac7ea0a-2374-4d4b-8d3a-71e4f896e751.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/web-app/public/photos/aac7ea0a-2374-4d4b-8d3a-71e4f896e751.jpeg -------------------------------------------------------------------------------- /adopt-a-pup/web-app/public/photos/b62977ad-fe79-4480-a550-06f717923017.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/web-app/public/photos/b62977ad-fe79-4480-a550-06f717923017.jpeg -------------------------------------------------------------------------------- /adopt-a-pup/web-app/public/photos/d52a8d58-9024-49dd-92b6-d443c6049ffe.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/web-app/public/photos/d52a8d58-9024-49dd-92b6-d443c6049ffe.jpeg -------------------------------------------------------------------------------- /adopt-a-pup/web-app/public/photos/e22d494c-c2be-4d32-bceb-ec675fd5540a.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/web-app/public/photos/e22d494c-c2be-4d32-bceb-ec675fd5540a.jpeg -------------------------------------------------------------------------------- /adopt-a-pup/web-app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/scripts/build_image_v1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # Builds webapp production build for v1 4 | # and creates a container image 5 | 6 | IMAGE=quay.io/redhattraining/ossm-adopt-a-pup-webapp 7 | APP_VERSION=v1 8 | IMAGE_TAG=1.0 9 | 10 | WEBAPP_ROOT=$(cd $(dirname $0)/.. && pwd) 11 | $WEBAPP_ROOT/scripts/build_image $APP_VERSION $IMAGE_TAG 12 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/scripts/build_image_v2: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # Builds webapp production build for v2 4 | # and creates a container image 5 | 6 | IMAGE=quay.io/redhattraining/ossm-adopt-a-pup-webapp 7 | APP_VERSION=v2 8 | IMAGE_TAG=2.0 9 | 10 | WEBAPP_ROOT=$(cd $(dirname $0)/.. && pwd) 11 | $WEBAPP_ROOT/scripts/build_image $APP_VERSION $IMAGE_TAG 12 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/App.test.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { render } from "@testing-library/react"; 3 | import App from "./App"; 4 | 5 | 6 | test("renders learn react link", () => { 7 | const { getByText } = render(); 8 | const linkElement = getByText(/^Adopt a pup/i); 9 | expect(linkElement).toBeInTheDocument(); 10 | }); 11 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Components/BullseyeSpinner.tsx: -------------------------------------------------------------------------------- 1 | import { Bullseye, Spinner } from "@patternfly/react-core"; 2 | import React from "react"; 3 | 4 | export default function BullseyeSpinner() { 5 | return ( 6 | 7 | 8 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Models/AdoptionApplication.ts: -------------------------------------------------------------------------------- 1 | import { Residency } from "./Residency"; 2 | 3 | export interface AdoptionApplication { 4 | username: string; 5 | animalId: string; 6 | residency: Residency; 7 | squareFootageOfHome: number; 8 | kidsUnder16: boolean; 9 | occupation: string; 10 | ownOtherAnimals: boolean; 11 | email: string; 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Models/Animal.ts: -------------------------------------------------------------------------------- 1 | export interface Animal { 2 | animalId?: string; 3 | photoUrl?: string; 4 | animalName: string; 5 | shelterId: string; 6 | breed: string; 7 | adoptable: boolean; 8 | approximateSize: string; 9 | residencyRequired: string; 10 | weight: number; 11 | squareFootageOfHome: number; 12 | childSafe: boolean; 13 | otherDogSafe: boolean; 14 | } 15 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Models/AnimalNotificationRequest.ts: -------------------------------------------------------------------------------- 1 | export interface AnimalNotificationRequest { 2 | username: string, 3 | email: string, 4 | breed: string, 5 | minWeight: number, 6 | maxWeight: number, 7 | approximateSize: string 8 | } 9 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Models/ApproximateSize.ts: -------------------------------------------------------------------------------- 1 | export enum ApproximateSize { 2 | S = "S", 3 | M = "M", 4 | L = "L" 5 | } 6 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Models/News.ts: -------------------------------------------------------------------------------- 1 | export interface News { 2 | id: string; 3 | title: string; 4 | timestamp: string; 5 | } 6 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Models/Residency.ts: -------------------------------------------------------------------------------- 1 | export enum Residency { 2 | APARTMENT = "APARTMENT", 3 | HOUSE = "HOUSE" 4 | } 5 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Models/Shelter.ts: -------------------------------------------------------------------------------- 1 | export interface Shelter { 2 | shelterId?: string; 3 | shelterName: string; 4 | state: string; 5 | country: string; 6 | address: string; 7 | email: string; 8 | phoneNumber: string; 9 | } 10 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Services/AdoptionService.ts: -------------------------------------------------------------------------------- 1 | import { Animal } from "../Models/Animal"; 2 | import { AdoptionApplication } from "../Models/AdoptionApplication"; 3 | 4 | 5 | export interface AdoptionService { 6 | getAdoptableByShelter(shelterId: string): Promise; 7 | applyForAdoption(adoptionApplication: AdoptionApplication): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Services/AnimalService.ts: -------------------------------------------------------------------------------- 1 | import { Animal } from "../Models/Animal"; 2 | import {AnimalNotificationRequest} from "../Models/AnimalNotificationRequest"; 3 | 4 | export interface AnimalService { 5 | create(animal: Animal): Promise; 6 | getAllAdoptable(): Promise; 7 | getById(id: string): Promise; 8 | subscribeNotifications(notificationRequest: AnimalNotificationRequest): Promise 9 | } 10 | 11 | 12 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Services/Delayer.ts: -------------------------------------------------------------------------------- 1 | export function delay(callable: () => T, milliseconds = 1000): Promise { 2 | return new Promise(resolve => { 3 | setTimeout(() => { 4 | resolve(callable()); 5 | }, milliseconds); 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Services/NewsFakeService.ts: -------------------------------------------------------------------------------- 1 | import { NewsService } from "./NewsService"; 2 | import { News } from "../Models/News"; 3 | 4 | 5 | export default class NewsFakeService implements NewsService { 6 | 7 | public async getAll(): Promise { 8 | return [ 9 | { id: "n1", title: "News 1", timestamp: "1970-01-01 00:00:01" }, 10 | { id: "n2", title: "News 2", timestamp: "1970-01-01 00:00:01" } 11 | ]; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Services/NewsRESTService.ts: -------------------------------------------------------------------------------- 1 | import { RESTService } from "./RESTService"; 2 | import { NewsService } from "./NewsService"; 3 | import { News } from "../Models/News"; 4 | 5 | 6 | export default class NewsRESTService extends RESTService implements NewsService { 7 | 8 | constructor(baseUrl: string) { 9 | super(baseUrl, "news-service"); 10 | } 11 | 12 | public getAll(): Promise { 13 | return this.get("/news/puppies"); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Services/NewsService.ts: -------------------------------------------------------------------------------- 1 | export interface NewsService { 2 | getAll(): Promise; 3 | } 4 | 5 | 6 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Services/PhotoService.ts: -------------------------------------------------------------------------------- 1 | export interface PhotoService { 2 | getAllUrls(): Promise; 3 | } 4 | 5 | 6 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/Services/ShelterService.ts: -------------------------------------------------------------------------------- 1 | import { Shelter } from "../Models/Shelter"; 2 | 3 | export interface ShelterService { 4 | create(shelter: Shelter): Promise; 5 | getById(id: string): Promise 6 | getAll(): Promise; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import "@testing-library/jest-dom/extend-expect"; 6 | import { configure } from "enzyme"; 7 | import Adapter from "enzyme-adapter-react-16"; 8 | 9 | configure({ adapter: new Adapter() }); 10 | -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/training_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/web-app/src/training_black.png -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/training_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/adopt-a-pup/web-app/src/training_white.png -------------------------------------------------------------------------------- /adopt-a-pup/web-app/src/v1.css: -------------------------------------------------------------------------------- 1 | 2 | #root { height:100%; } 3 | 4 | .logo { 5 | height: 2.5rem; 6 | } 7 | 8 | 9 | @keyframes popupFadeIn { 10 | from { 11 | transform: translateY(-50%); 12 | opacity: 0; 13 | } 14 | to { 15 | transform: translateY(0); 16 | opacity: 1; 17 | } 18 | } 19 | 20 | .popup { 21 | animation-name: popupFadeIn; 22 | animation-duration: .3s; 23 | } 24 | 25 | 26 | .selected { 27 | background-color: #ddffdd; 28 | } 29 | 30 | .clickable { 31 | cursor: pointer; 32 | } 33 | -------------------------------------------------------------------------------- /customer/quarkus/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /customer/quarkus/src/main/docker/Dockerfile.jvm: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.5.4 2 | ENV JAVA_OPTIONS=-Dquarkus.http.host=0.0.0.0 3 | ENV JAEGER_SERVICE_NAME=customer\ 4 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 5 | JAEGER_PROPAGATION=b3\ 6 | JAEGER_SAMPLER_TYPE=const\ 7 | JAEGER_SAMPLER_PARAM=1 8 | EXPOSE 8080 8778 9779 9 | COPY target/lib/* /deployments/lib/ 10 | COPY target/*-runner.jar /deployments/app.jar 11 | ENTRYPOINT [ "/deployments/run-java.sh" ] -------------------------------------------------------------------------------- /customer/quarkus/src/main/docker/Dockerfile.native: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | ENV JAEGER_SERVICE_NAME=customer\ 3 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 4 | JAEGER_PROPAGATION=b3\ 5 | JAEGER_SAMPLER_TYPE=const\ 6 | JAEGER_SAMPLER_PARAM=1 7 | WORKDIR /work/ 8 | COPY target/*-runner /work/customer 9 | RUN chmod 775 /work 10 | EXPOSE 8080 8778 9779 11 | CMD ["./customer", "-Dquarkus.http.host=0.0.0.0", "-Xmx8m", "-Xmn8m", "-Xms8m"] -------------------------------------------------------------------------------- /customer/quarkus/src/main/java/com/redhat/developer/demos/customer/rest/PreferenceService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.customer.rest; 2 | 3 | import org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders; 4 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.Produces; 9 | 10 | @RegisterClientHeaders(BaggageHeadersFactory.class) 11 | @RegisterRestClient 12 | public interface PreferenceService { 13 | 14 | @Path("/") 15 | @GET 16 | @Produces("text/plain") 17 | public String getPreference(); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /customer/quarkus/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | com.redhat.developer.demos.customer.rest.PreferenceService/mp-rest/url=http://preference:8080 -------------------------------------------------------------------------------- /customer/quarkus/src/test/java/com/redhat/developer/demos/customer/rest/NativeCustomerResourceIT.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.customer.rest; 2 | 3 | import io.quarkus.test.junit.NativeImageTest; 4 | 5 | @NativeImageTest 6 | public class NativeCustomerResourceIT extends CustomerResourceTest { 7 | 8 | // Execute the same tests but in native mode. 9 | } -------------------------------------------------------------------------------- /dashboard/backend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /dashboard/backend/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/nodejs-12 2 | 3 | COPY package.json . 4 | COPY package-lock.json . 5 | 6 | RUN npm ci --production 7 | 8 | COPY lib ./lib 9 | COPY index.js . 10 | 11 | CMD node index.js 12 | -------------------------------------------------------------------------------- /dashboard/backend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backend", 3 | "version": "1.0.0", 4 | "description": "Backend for the Connectivity Checker frontend", 5 | "main": "index.js", 6 | "author": "Marek Czernek", 7 | "license": "MIT", 8 | "scripts": { 9 | "start": "node index.js", 10 | "lint": "eslint .", 11 | "lint:fix": "eslint . --fix" 12 | }, 13 | "dependencies": { 14 | "express": "^4.17.1", 15 | "request": "^2.88.2" 16 | }, 17 | "devDependencies": { 18 | "eslint": "^6.8.0" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /dashboard/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /dashboard/frontend/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/nodejs-12 2 | 3 | # URL of the exchange app (typically the route for istio-ingressgateway) 4 | # All env vars exposed to the React app must start with REACT_APP 5 | ENV REACT_APP_GW_ENDPOINT=PLACEHOLDER 6 | # Workaround for https://github.com/facebook/create-react-app/issues/8688 7 | ENV CI=true 8 | 9 | # Cache dependencies 10 | COPY package.json . 11 | COPY package-lock.json . 12 | RUN npm ci --production 13 | 14 | # Cache public files 15 | COPY public ./public 16 | 17 | COPY src ./src 18 | 19 | EXPOSE 3000 20 | 21 | CMD [ "npm", "start" ] 22 | -------------------------------------------------------------------------------- /dashboard/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/dashboard/frontend/public/favicon.ico -------------------------------------------------------------------------------- /dashboard/frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Dashboard", 3 | "name": "Exchange Application Dashboard", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /dashboard/frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /dashboard/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import "@patternfly/react-core/dist/styles/base.css"; 4 | import "./index.css"; 5 | import App from "./App"; 6 | import * as serviceWorker from "./serviceWorker"; 7 | 8 | ReactDOM.render( 9 | 10 | 11 | , 12 | document.getElementById("root") 13 | ); 14 | 15 | // If you want your app to work offline and load faster, you can change 16 | // unregister() to register() below. Note this comes with some pitfalls. 17 | // Learn more about service workers: https://bit.ly/CRA-PWA 18 | serviceWorker.unregister(); 19 | -------------------------------------------------------------------------------- /dashboard/imgs/frontend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/dashboard/imgs/frontend.png -------------------------------------------------------------------------------- /exchange-application/currencies/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /venv 5 | __pycache__ 6 | 7 | # misc 8 | .DS_Store 9 | -------------------------------------------------------------------------------- /exchange-application/currencies/v1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/python-36 2 | 3 | ENV FLASK_APP="currencies.py" 4 | 5 | COPY src /app 6 | COPY requirements.txt /app 7 | 8 | WORKDIR /app 9 | 10 | RUN pip install -r requirements.txt 11 | 12 | EXPOSE 5000 13 | 14 | CMD [ "flask", "run", "--host=0.0.0.0"] 15 | -------------------------------------------------------------------------------- /exchange-application/currencies/v1/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask 2 | flask-cors 3 | -------------------------------------------------------------------------------- /exchange-application/currencies/v1/src/currencies.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, jsonify 2 | from flask_cors import CORS 3 | 4 | app = Flask(__name__) 5 | CORS(app) 6 | 7 | @app.route('/') 8 | def currenciesList(): 9 | return jsonify('EUR', 'USD') 10 | -------------------------------------------------------------------------------- /exchange-application/currencies/v2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/python-36 2 | 3 | ENV FLASK_APP="currencies.py" 4 | 5 | COPY src /app 6 | COPY requirements.txt /app 7 | 8 | WORKDIR /app 9 | 10 | RUN pip install -r requirements.txt 11 | 12 | EXPOSE 5000 13 | 14 | CMD [ "flask", "run", "--host=0.0.0.0"] 15 | -------------------------------------------------------------------------------- /exchange-application/currencies/v2/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask 2 | flask-cors 3 | -------------------------------------------------------------------------------- /exchange-application/exchange/.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse 2 | .project 3 | .classpath 4 | .settings/ 5 | bin/ 6 | 7 | # IntelliJ 8 | .idea 9 | *.ipr 10 | *.iml 11 | *.iws 12 | 13 | # NetBeans 14 | nb-configuration.xml 15 | 16 | # Visual Studio Code 17 | .vscode 18 | 19 | # OSX 20 | .DS_Store 21 | 22 | # Vim 23 | *.swp 24 | *.swo 25 | 26 | # patch 27 | *.orig 28 | *.rej 29 | 30 | # Maven 31 | target/ 32 | pom.xml.tag 33 | pom.xml.releaseBackup 34 | pom.xml.versionsBackup 35 | release.properties 36 | -------------------------------------------------------------------------------- /exchange-application/exchange/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM quay.io/quarkus/centos-quarkus-maven:20.0.0-java11 AS build 2 | 3 | WORKDIR /usr/src/app 4 | 5 | # Cache dependencies 6 | COPY pom.xml . 7 | RUN mvn clean dependency:resolve 8 | 9 | # Build native image 10 | COPY src /usr/src/app/src 11 | RUN mvn clean package -Pnative 12 | 13 | ## Stage 2 : create the docker final image 14 | FROM registry.access.redhat.com/ubi8/ubi-minimal 15 | WORKDIR /work/ 16 | COPY --from=build /usr/src/app/target/*-runner /work/application 17 | RUN chmod 775 /work 18 | EXPOSE 8080 19 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] 20 | -------------------------------------------------------------------------------- /exchange-application/exchange/src/main/java/com/redhat/restclient/CurrencyService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.restclient; 2 | 3 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 4 | 5 | import javax.ws.rs.Consumes; 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.Produces; 9 | import javax.ws.rs.core.MediaType; 10 | import java.util.List; 11 | 12 | @Path("/") 13 | @RegisterRestClient 14 | public interface CurrencyService { 15 | 16 | @GET 17 | @Produces(MediaType.APPLICATION_JSON) 18 | @Consumes(MediaType.APPLICATION_JSON) 19 | List getCurrencyNames(); 20 | } 21 | -------------------------------------------------------------------------------- /exchange-application/exchange/src/main/java/com/redhat/restclient/NewsService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.restclient; 2 | 3 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 4 | 5 | import javax.ws.rs.Consumes; 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.Produces; 9 | import javax.ws.rs.core.MediaType; 10 | import java.util.List; 11 | 12 | @Path("/") 13 | @RegisterRestClient 14 | public interface NewsService { 15 | 16 | @GET 17 | @Produces(MediaType.APPLICATION_JSON) 18 | List getFinancialNews(); 19 | } 20 | -------------------------------------------------------------------------------- /exchange-application/exchange/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Configuration file 2 | com.redhat.restclient.ExchangeService/mp-rest/url=http://history:8080 3 | com.redhat.restclient.ExchangeService/mp-rest/scope=javax.inject.Singleton 4 | com.redhat.restclient.CurrencyService/mp-rest/url=http://currency:5000 5 | com.redhat.restclient.CurrencyService/mp-rest/scope=javax.inject.Singleton 6 | com.redhat.restclient.NewsService/mp-rest/url=${NEWS_ENDPOINT}/news/finance 7 | com.redhat.restclient.NewsService/mp-rest/scope=javax.inject.Singleton 8 | quarkus.http.port=8080 9 | 10 | -------------------------------------------------------------------------------- /exchange-application/exchange/src/test/java/com/redhat/restclient/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /exchange-application/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /exchange-application/frontend/v1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/nodejs-12 2 | 3 | # URL of the exchange app 4 | # All env vars exposed to the React app must start with REACT_APP 5 | ENV REACT_APP_GW_ENDPOINT=PLACEHOLDER 6 | 7 | # Cache dependencies 8 | COPY package.json . 9 | COPY package-lock.json . 10 | RUN npm ci --production 11 | 12 | # Cache public files 13 | COPY public ./public 14 | 15 | COPY src ./src 16 | 17 | EXPOSE 3000 18 | 19 | CMD npm start 20 | -------------------------------------------------------------------------------- /exchange-application/frontend/v1/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v1/public/favicon.ico -------------------------------------------------------------------------------- /exchange-application/frontend/v1/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v1/public/logo192.png -------------------------------------------------------------------------------- /exchange-application/frontend/v1/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v1/public/logo512.png -------------------------------------------------------------------------------- /exchange-application/frontend/v1/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /exchange-application/frontend/v1/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /exchange-application/frontend/v1/src/App.css: -------------------------------------------------------------------------------- 1 | .centered { 2 | text-align: center; 3 | } 4 | 5 | .margin-separator { 6 | margin-top: 20px; 7 | } 8 | 9 | .text-container { 10 | text-align: center; 11 | font-size: 3em; 12 | max-width: 300px; 13 | border-bottom-style: solid; 14 | border-color: #2b9af3; 15 | word-wrap: break-word; 16 | } 17 | 18 | .currency-text { 19 | font-size: 0.6em; 20 | vertical-align: top; 21 | } 22 | -------------------------------------------------------------------------------- /exchange-application/frontend/v1/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import '@patternfly/react-core/dist/styles/base.css'; 4 | import './App.css' 5 | import App from './App'; 6 | import * as serviceWorker from './serviceWorker'; 7 | 8 | ReactDOM.render(, document.getElementById('root')); 9 | 10 | // If you want your app to work offline and load faster, you can change 11 | // unregister() to register() below. Note this comes with some pitfalls. 12 | // Learn more about service workers: https://bit.ly/CRA-PWA 13 | serviceWorker.unregister(); 14 | -------------------------------------------------------------------------------- /exchange-application/frontend/v1/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /exchange-application/frontend/v1/src/training_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v1/src/training_black.png -------------------------------------------------------------------------------- /exchange-application/frontend/v1/src/training_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v1/src/training_white.png -------------------------------------------------------------------------------- /exchange-application/frontend/v2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/nodejs-12 2 | 3 | # URL of the exchange app 4 | # All env vars exposed to the React app must start with REACT_APP 5 | ENV REACT_APP_GW_ENDPOINT=PLACEHOLDER 6 | 7 | # Cache dependencies 8 | COPY package.json . 9 | COPY package-lock.json . 10 | RUN npm ci --production 11 | 12 | # Cache public files 13 | COPY public ./public 14 | 15 | COPY src ./src 16 | 17 | EXPOSE 3000 18 | 19 | CMD npm start 20 | -------------------------------------------------------------------------------- /exchange-application/frontend/v2/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v2/public/favicon.ico -------------------------------------------------------------------------------- /exchange-application/frontend/v2/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v2/public/logo192.png -------------------------------------------------------------------------------- /exchange-application/frontend/v2/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v2/public/logo512.png -------------------------------------------------------------------------------- /exchange-application/frontend/v2/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /exchange-application/frontend/v2/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /exchange-application/frontend/v2/src/App.css: -------------------------------------------------------------------------------- 1 | .centered { 2 | text-align: center; 3 | } 4 | 5 | .margin-separator { 6 | margin-top: 20px; 7 | } 8 | 9 | .text-container { 10 | text-align: center; 11 | font-size: 3em; 12 | max-width: 300px; 13 | border-bottom-style: solid; 14 | border-color: #2b9af3; 15 | word-wrap: break-word; 16 | } 17 | 18 | .currency-text { 19 | font-size: 0.6em; 20 | vertical-align: top; 21 | } 22 | -------------------------------------------------------------------------------- /exchange-application/frontend/v2/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import '@patternfly/react-core/dist/styles/base.css'; 4 | import './App.css' 5 | import App from './App'; 6 | import * as serviceWorker from './serviceWorker'; 7 | 8 | ReactDOM.render(, document.getElementById('root')); 9 | 10 | // If you want your app to work offline and load faster, you can change 11 | // unregister() to register() below. Note this comes with some pitfalls. 12 | // Learn more about service workers: https://bit.ly/CRA-PWA 13 | serviceWorker.unregister(); 14 | -------------------------------------------------------------------------------- /exchange-application/frontend/v2/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /exchange-application/frontend/v2/src/training_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v2/src/training_black.png -------------------------------------------------------------------------------- /exchange-application/frontend/v2/src/training_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v2/src/training_white.png -------------------------------------------------------------------------------- /exchange-application/frontend/v3.1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/nodejs-12 2 | 3 | # URL of the exchange app 4 | # All env vars exposed to the React app must start with REACT_APP 5 | ENV REACT_APP_GW_ENDPOINT=PLACEHOLDER 6 | 7 | # Cache dependencies 8 | COPY package.json . 9 | COPY package-lock.json . 10 | RUN npm ci --production 11 | 12 | # Cache public files 13 | COPY public ./public 14 | 15 | COPY src ./src 16 | 17 | EXPOSE 3000 18 | 19 | CMD npm start 20 | -------------------------------------------------------------------------------- /exchange-application/frontend/v3.1/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v3.1/public/favicon.ico -------------------------------------------------------------------------------- /exchange-application/frontend/v3.1/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v3.1/public/logo192.png -------------------------------------------------------------------------------- /exchange-application/frontend/v3.1/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v3.1/public/logo512.png -------------------------------------------------------------------------------- /exchange-application/frontend/v3.1/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /exchange-application/frontend/v3.1/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /exchange-application/frontend/v3.1/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import '@patternfly/react-core/dist/styles/base.css'; 4 | import './App.css' 5 | import App from './App'; 6 | import * as serviceWorker from './serviceWorker'; 7 | 8 | ReactDOM.render(, document.getElementById('root')); 9 | 10 | // If you want your app to work offline and load faster, you can change 11 | // unregister() to register() below. Note this comes with some pitfalls. 12 | // Learn more about service workers: https://bit.ly/CRA-PWA 13 | serviceWorker.unregister(); 14 | -------------------------------------------------------------------------------- /exchange-application/frontend/v3.1/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /exchange-application/frontend/v3.1/src/training_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v3.1/src/training_black.png -------------------------------------------------------------------------------- /exchange-application/frontend/v3.1/src/training_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v3.1/src/training_white.png -------------------------------------------------------------------------------- /exchange-application/frontend/v3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/nodejs-12 2 | 3 | # URL of the exchange app 4 | # All env vars exposed to the React app must start with REACT_APP 5 | ENV REACT_APP_GW_ENDPOINT=PLACEHOLDER 6 | 7 | # Cache dependencies 8 | COPY package.json . 9 | COPY package-lock.json . 10 | RUN npm ci --production 11 | 12 | # Cache public files 13 | COPY public ./public 14 | 15 | COPY src ./src 16 | 17 | EXPOSE 3000 18 | 19 | CMD npm start 20 | -------------------------------------------------------------------------------- /exchange-application/frontend/v3/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v3/public/favicon.ico -------------------------------------------------------------------------------- /exchange-application/frontend/v3/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v3/public/logo192.png -------------------------------------------------------------------------------- /exchange-application/frontend/v3/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v3/public/logo512.png -------------------------------------------------------------------------------- /exchange-application/frontend/v3/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /exchange-application/frontend/v3/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /exchange-application/frontend/v3/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import '@patternfly/react-core/dist/styles/base.css'; 4 | import './App.css' 5 | import App from './App'; 6 | import * as serviceWorker from './serviceWorker'; 7 | 8 | ReactDOM.render(, document.getElementById('root')); 9 | 10 | // If you want your app to work offline and load faster, you can change 11 | // unregister() to register() below. Note this comes with some pitfalls. 12 | // Learn more about service workers: https://bit.ly/CRA-PWA 13 | serviceWorker.unregister(); 14 | -------------------------------------------------------------------------------- /exchange-application/frontend/v3/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /exchange-application/frontend/v3/src/training_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v3/src/training_black.png -------------------------------------------------------------------------------- /exchange-application/frontend/v3/src/training_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/frontend/v3/src/training_white.png -------------------------------------------------------------------------------- /exchange-application/history/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /exchange-application/history/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/nodejs-12 2 | 3 | COPY package.json . 4 | 5 | RUN npm install 6 | 7 | COPY lib ./lib 8 | COPY index.js . 9 | 10 | CMD node index.js 11 | -------------------------------------------------------------------------------- /exchange-application/history/lib/constants.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const PORT = process.env.PORT || 8080; 4 | 5 | const USD_TO_EUR = [ 6 | {"value": 0.90}, 7 | {"value": 0.91}, 8 | {"value": 0.92}, 9 | {"value": 0.93}, 10 | {"value": 0.92}, 11 | {"value": 0.91}, 12 | {"value": 0.95}, 13 | ]; 14 | 15 | const EUR_TO_USD = [ 16 | {"value": 1.11}, 17 | {"value": 1.1}, 18 | {"value": 1.09}, 19 | {"value": 1.08}, 20 | {"value": 1.09}, 21 | {"value": 1.1}, 22 | {"value": 1.05}, 23 | ]; 24 | 25 | module.exports = { 26 | PORT : PORT, 27 | EUR_TO_USD: EUR_TO_USD, 28 | USD_TO_EUR: USD_TO_EUR, 29 | }; 30 | -------------------------------------------------------------------------------- /exchange-application/history/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "history", 3 | "version": "1.0.0", 4 | "description": "A backend data service that returns historical data of currency exchange", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Marek Czernek ", 10 | "license": "ISC", 11 | "dependencies": { 12 | "express": "^4.17.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /exchange-application/history/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "source": "USD", 3 | "target": "EUR" 4 | } 5 | -------------------------------------------------------------------------------- /exchange-application/imgs/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-application/imgs/app.png -------------------------------------------------------------------------------- /exchange-traced/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | -------------------------------------------------------------------------------- /exchange-traced/currencies/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /venv 5 | __pycache__ 6 | 7 | # misc 8 | .DS_Store 9 | -------------------------------------------------------------------------------- /exchange-traced/currencies/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/python-36 2 | 3 | ENV FLASK_APP="currencies.py" \ 4 | JAEGER_AGENT_HOST="jaeger-agent.istio-system" 5 | 6 | COPY src /app 7 | COPY requirements.txt /app 8 | 9 | WORKDIR /app 10 | 11 | RUN pip install -r requirements.txt 12 | 13 | EXPOSE 5000 14 | 15 | CMD [ "flask", "run", "--host=0.0.0.0"] 16 | -------------------------------------------------------------------------------- /exchange-traced/currencies/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.1 2 | Flask==1.1.2 3 | Flask-Cors==3.0.8 4 | itsdangerous==1.1.0 5 | jaeger-client==4.3.0 6 | Jinja2==2.11.2 7 | MarkupSafe==1.1.1 8 | opentracing==2.3.0 9 | six==1.14.0 10 | threadloop==1.0.2 11 | thrift==0.13.0 12 | tornado==6.0.4 13 | Werkzeug==1.0.1 14 | -------------------------------------------------------------------------------- /exchange-traced/exchange/.gitignore: -------------------------------------------------------------------------------- 1 | .classpath 2 | .settings 3 | .vscode 4 | .project 5 | target 6 | -------------------------------------------------------------------------------- /exchange-traced/exchange/src/main/java/com/redhat/restclient/CurrencyService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.restclient; 2 | 3 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 4 | 5 | import javax.ws.rs.Consumes; 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.Produces; 9 | import javax.ws.rs.core.MediaType; 10 | import java.util.List; 11 | 12 | @Path("/") 13 | @RegisterRestClient 14 | public interface CurrencyService { 15 | 16 | @GET 17 | @Produces(MediaType.APPLICATION_JSON) 18 | @Consumes(MediaType.APPLICATION_JSON) 19 | List getCurrencyNames(); 20 | } 21 | -------------------------------------------------------------------------------- /exchange-traced/exchange/src/main/java/com/redhat/restclient/NewsService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.restclient; 2 | 3 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 4 | 5 | import javax.ws.rs.Consumes; 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.Produces; 9 | import javax.ws.rs.core.MediaType; 10 | import java.util.List; 11 | 12 | @Path("/") 13 | @RegisterRestClient 14 | public interface NewsService { 15 | 16 | @GET 17 | @Produces(MediaType.APPLICATION_JSON) 18 | List getFinancialNews(); 19 | } 20 | -------------------------------------------------------------------------------- /exchange-traced/exchange/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Configuration file 2 | com.redhat.restclient.ExchangeService/mp-rest/url=http://history:8080 3 | com.redhat.restclient.ExchangeService/mp-rest/scope=javax.inject.Singleton 4 | com.redhat.restclient.CurrencyService/mp-rest/url=http://currency:5000 5 | com.redhat.restclient.CurrencyService/mp-rest/scope=javax.inject.Singleton 6 | com.redhat.restclient.NewsService/mp-rest/url=${NEWS_ENDPOINT}/news/finance 7 | com.redhat.restclient.NewsService/mp-rest/scope=javax.inject.Singleton 8 | quarkus.http.port=8080 9 | quarkus.package.uber-jar=true -------------------------------------------------------------------------------- /exchange-traced/exchange/src/test/java/com/redhat/restclient/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /exchange-traced/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /exchange-traced/frontend/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/nodejs-12 2 | 3 | # URL of the exchange app 4 | # All env vars exposed to the React app must start with REACT_APP 5 | ENV REACT_APP_GW_ENDPOINT=exchange-exchange-app.apps.ocp-d43.dev.nextcle.com 6 | 7 | # Cache dependencies 8 | COPY package.json . 9 | RUN npm install 10 | 11 | # Cache public files 12 | COPY public ./public 13 | 14 | COPY src ./src 15 | 16 | EXPOSE 3000 17 | 18 | CMD npm start 19 | -------------------------------------------------------------------------------- /exchange-traced/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-traced/frontend/public/favicon.ico -------------------------------------------------------------------------------- /exchange-traced/frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-traced/frontend/public/logo192.png -------------------------------------------------------------------------------- /exchange-traced/frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-traced/frontend/public/logo512.png -------------------------------------------------------------------------------- /exchange-traced/frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /exchange-traced/frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /exchange-traced/frontend/src/App.css: -------------------------------------------------------------------------------- 1 | .centered { 2 | text-align: center; 3 | } 4 | 5 | .margin-separator { 6 | margin-top: 20px; 7 | } 8 | 9 | .text-container { 10 | text-align: center; 11 | font-size: 3em; 12 | max-width: 300px; 13 | border-bottom-style: solid; 14 | border-color: #2b9af3; 15 | word-wrap: break-word; 16 | } 17 | 18 | .currency-text { 19 | font-size: 0.6em; 20 | vertical-align: top; 21 | } 22 | -------------------------------------------------------------------------------- /exchange-traced/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import '@patternfly/react-core/dist/styles/base.css'; 4 | import './App.css' 5 | import App from './App'; 6 | import * as serviceWorker from './serviceWorker'; 7 | 8 | ReactDOM.render(, document.getElementById('root')); 9 | 10 | // If you want your app to work offline and load faster, you can change 11 | // unregister() to register() below. Note this comes with some pitfalls. 12 | // Learn more about service workers: https://bit.ly/CRA-PWA 13 | serviceWorker.unregister(); 14 | -------------------------------------------------------------------------------- /exchange-traced/frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /exchange-traced/frontend/src/training_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-traced/frontend/src/training_black.png -------------------------------------------------------------------------------- /exchange-traced/frontend/src/training_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/exchange-traced/frontend/src/training_white.png -------------------------------------------------------------------------------- /exchange-traced/history/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /exchange-traced/history/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/nodejs-12 2 | 3 | ENV JAEGER_SERVICE_NAME=history \ 4 | JAEGER_SAMPLER_TYPE=const \ 5 | JAEGER_SAMPLER_PARAM=1 \ 6 | JAEGER_REPORTER_LOG_SPANS=true \ 7 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces 8 | 9 | COPY package.json . 10 | 11 | RUN npm install 12 | 13 | COPY lib ./lib 14 | COPY index.js . 15 | 16 | CMD node index.js 17 | -------------------------------------------------------------------------------- /exchange-traced/history/lib/constants.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const PORT = process.env.PORT || 8080; 4 | 5 | const USD_TO_EUR = [ 6 | {"value": 0.90}, 7 | {"value": 0.91}, 8 | {"value": 0.92}, 9 | {"value": 0.93}, 10 | {"value": 0.92}, 11 | {"value": 0.91}, 12 | {"value": 0.95}, 13 | ]; 14 | 15 | const EUR_TO_USD = [ 16 | {"value": 1.11}, 17 | {"value": 1.1}, 18 | {"value": 1.09}, 19 | {"value": 1.08}, 20 | {"value": 1.09}, 21 | {"value": 1.1}, 22 | {"value": 1.05}, 23 | ]; 24 | 25 | module.exports = { 26 | PORT, 27 | EUR_TO_USD, 28 | USD_TO_EUR 29 | }; 30 | -------------------------------------------------------------------------------- /exchange-traced/history/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "history", 3 | "version": "1.0.0", 4 | "description": "A backend data service that returns historical data of currency exchange", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Marek Czernek ", 10 | "license": "ISC", 11 | "dependencies": { 12 | "express": "^4.17.1", 13 | "jaeger-client": "^3.18.0", 14 | "opentracing": "^0.14.4" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /exchange-traced/history/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "source": "USD", 3 | "target": "EUR" 4 | } 5 | -------------------------------------------------------------------------------- /istio-tutorial/.hasrc: -------------------------------------------------------------------------------- 1 | # cloud 2 | minishift 3 | docker 4 | oc 5 | kubectl 6 | 7 | # sources 8 | git 9 | mvn 10 | 11 | # access 12 | curl 13 | stern 14 | siege -------------------------------------------------------------------------------- /istio-tutorial/bin/install-base-services.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | oc apply -f <(istioctl kube-inject --debug -f ../customer/src/main/kubernetes/Deployment.yml) 4 | oc apply -f ../customer/src/main/kubernetes/Service.yml 5 | oc apply -f <(istioctl kube-inject --debug -f ../preference/src/main/kubernetes/Deployment.yml) 6 | oc apply -f ../preference/src/main/kubernetes/Service.yml 7 | oc apply -f <(istioctl kube-inject --debug -f ../recommendation/src/main/kubernetes/Deployment.yml) 8 | oc apply -f ../recommendation/src/main/kubernetes/Service.yml 9 | 10 | oc expose service customer 11 | oc get route -------------------------------------------------------------------------------- /istio-tutorial/bin/install-recommendations-v2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | oc apply -f <(istioctl kube-inject --debug -f ../recommendation/src/main/kubernetes/Deployment-v2.yml) 4 | -------------------------------------------------------------------------------- /istio-tutorial/customer/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | 12 | ### IntelliJ IDEA ### 13 | .idea 14 | *.iws 15 | *.iml 16 | *.ipr 17 | 18 | ### NetBeans ### 19 | nbproject/private/ 20 | build/ 21 | nbbuild/ 22 | dist/ 23 | nbdist/ 24 | .nb-gradle/ -------------------------------------------------------------------------------- /istio-tutorial/customer/dotnet/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/dotnet/dotnet-20-runtime-rhel7 2 | 3 | ADD bin/Release/netcoreapp2.0/rhel.7-x64/publish/. /app/ 4 | 5 | WORKDIR /app/ 6 | 7 | EXPOSE 8080 8 | 9 | CMD ["scl", "enable", "rh-dotnet20", "--", "dotnet", "customer.dll"] 10 | -------------------------------------------------------------------------------- /istio-tutorial/customer/dotnet/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /istio-tutorial/customer/dotnet/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Warning" 7 | } 8 | }, 9 | "Console": { 10 | "LogLevel": { 11 | "Default": "Warning" 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /istio-tutorial/customer/dotnet/dotnet.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /istio-tutorial/customer/dotnet/pub.sh: -------------------------------------------------------------------------------- 1 | dotnet publish -c Release -r rhel.7-x64 --self-contained=false -------------------------------------------------------------------------------- /istio-tutorial/customer/dotnet/standalone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ASSEMBLY=customer.dll 4 | SCL=rh-dotnet20 5 | DIR="$(dirname "$(readlink -f "$0")")" 6 | 7 | scl enable $SCL -- dotnet "$DIR/$ASSEMBLY" "$@" -------------------------------------------------------------------------------- /istio-tutorial/customer/java/camel-springboot/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /istio-tutorial/customer/java/camel-springboot/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/customer/java/camel-springboot/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /istio-tutorial/customer/java/camel-springboot/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip 2 | -------------------------------------------------------------------------------- /istio-tutorial/customer/java/camel-springboot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.3.1 2 | ENV AB_OFF=true 3 | ENV JAVA_APP_DIR=/deployments 4 | ENV JAEGER_SERVICE_NAME=customer\ 5 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 6 | JAEGER_PROPAGATION=b3\ 7 | JAEGER_SAMPLER_TYPE=const\ 8 | JAEGER_SAMPLER_PARAM=1 9 | EXPOSE 8080 8778 9779 10 | COPY target/customer.jar /deployments/ 11 | -------------------------------------------------------------------------------- /istio-tutorial/customer/java/camel-springboot/src/main/java/com/redhat/developer/demos/CustomerApplication.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos; 2 | 3 | import org.apache.camel.opentracing.starter.CamelOpenTracing; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | @SpringBootApplication 8 | @CamelOpenTracing 9 | public class CustomerApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(CustomerApplication.class, args); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /istio-tutorial/customer/java/camel-springboot/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Enable stream caching on all routes 2 | camel.springboot.stream-caching-enabled=true 3 | camel.component.servlet.mapping.context-path=/* 4 | -------------------------------------------------------------------------------- /istio-tutorial/customer/java/microprofile/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.3.1 2 | ENV JAVA_APP_DIR=/deployments 3 | ENV AB_OFF=true 4 | ENV JAEGER_SERVICE_NAME=customer\ 5 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 6 | JAEGER_PROPAGATION=b3\ 7 | JAEGER_SAMPLER_TYPE=const\ 8 | JAEGER_SAMPLER_PARAM=1 9 | EXPOSE 8080 8778 9779 10 | COPY target/customer-swarm.jar /deployments/ 11 | -------------------------------------------------------------------------------- /istio-tutorial/customer/java/microprofile/src/main/java/com/redhat/developer/demos/customer/rest/CustomerApplication.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.customer.rest; 2 | 3 | import javax.ws.rs.ApplicationPath; 4 | import javax.ws.rs.core.Application; 5 | 6 | @ApplicationPath("/") 7 | public class CustomerApplication extends Application { 8 | 9 | public CustomerApplication() { 10 | } 11 | } -------------------------------------------------------------------------------- /istio-tutorial/customer/java/microprofile/src/main/resources/META-INF/microprofile-config.properties: -------------------------------------------------------------------------------- 1 | preferences.api.url=http://preference:8080 -------------------------------------------------------------------------------- /istio-tutorial/customer/java/quarkus/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /istio-tutorial/customer/java/quarkus/src/main/docker/Dockerfile.jvm: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.5.4 2 | ENV JAVA_OPTIONS=-Dquarkus.http.host=0.0.0.0 3 | ENV JAEGER_SERVICE_NAME=customer\ 4 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 5 | JAEGER_PROPAGATION=b3\ 6 | JAEGER_SAMPLER_TYPE=const\ 7 | JAEGER_SAMPLER_PARAM=1 8 | EXPOSE 8080 8778 9779 9 | COPY target/lib/* /deployments/lib/ 10 | COPY target/*-runner.jar /deployments/app.jar 11 | ENTRYPOINT [ "/deployments/run-java.sh" ] -------------------------------------------------------------------------------- /istio-tutorial/customer/java/quarkus/src/main/docker/Dockerfile.native: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | ENV JAEGER_SERVICE_NAME=customer\ 3 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 4 | JAEGER_PROPAGATION=b3\ 5 | JAEGER_SAMPLER_TYPE=const\ 6 | JAEGER_SAMPLER_PARAM=1 7 | WORKDIR /work/ 8 | COPY target/*-runner /work/customer 9 | RUN chmod 775 /work 10 | EXPOSE 8080 8778 9779 11 | CMD ["./customer", "-Dquarkus.http.host=0.0.0.0", "-Xmx8m", "-Xmn8m", "-Xms8m"] -------------------------------------------------------------------------------- /istio-tutorial/customer/java/quarkus/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | com.redhat.developer.demos.customer.rest.PreferenceService/mp-rest/url=http://preference:8080 -------------------------------------------------------------------------------- /istio-tutorial/customer/java/quarkus/src/test/java/com/redhat/developer/demos/customer/rest/NativeCustomerResourceIT.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.customer.rest; 2 | 3 | import io.quarkus.test.junit.NativeImageTest; 4 | 5 | @NativeImageTest 6 | public class NativeCustomerResourceIT extends CustomerResourceTest { 7 | 8 | // Execute the same tests but in native mode. 9 | } -------------------------------------------------------------------------------- /istio-tutorial/customer/java/springboot/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/customer/java/springboot/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /istio-tutorial/customer/java/springboot/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip 2 | -------------------------------------------------------------------------------- /istio-tutorial/customer/java/springboot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.5.2 2 | ENV JAVA_APP_DIR=/deployments 3 | ENV JAEGER_SERVICE_NAME=customer\ 4 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 5 | JAEGER_PROPAGATION=b3\ 6 | JAEGER_SAMPLER_TYPE=const\ 7 | JAEGER_SAMPLER_PARAM=1 8 | EXPOSE 8080 8778 9779 9 | COPY target/customer.jar /deployments/ 10 | -------------------------------------------------------------------------------- /istio-tutorial/customer/java/springboot/src/main/resources/application-local.properties: -------------------------------------------------------------------------------- 1 | preferences.api.url=http://localhost:8180 2 | server.port=8280 -------------------------------------------------------------------------------- /istio-tutorial/customer/java/springboot/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | preferences.api.url=http://preference:8080 2 | -------------------------------------------------------------------------------- /istio-tutorial/customer/java/springboot/src/test/java/com/redhat/developer/demos/customer/CustomerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.customer; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class CustomerApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /istio-tutorial/customer/java/springboot/trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/customer/java/springboot/trace.png -------------------------------------------------------------------------------- /istio-tutorial/customer/kubernetes/Service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: customer 5 | labels: 6 | app: customer 7 | spec: 8 | ports: 9 | - name: http 10 | port: 8080 11 | selector: 12 | app: customer 13 | -------------------------------------------------------------------------------- /istio-tutorial/customer/node/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:6.9.2 2 | #FROM rhscl/nodejs-6-rhel7 3 | 4 | # Create directory for application 5 | RUN mkdir -p /usr/src/app 6 | WORKDIR /usr/src/app 7 | 8 | # Dependencies are installed here 9 | COPY package.json /usr/src/app/ 10 | RUN npm install 11 | 12 | # App sourcd 13 | COPY . /usr/src/app/ 14 | 15 | EXPOSE 8080 16 | CMD ["node", "customer.js"] 17 | -------------------------------------------------------------------------------- /istio-tutorial/customer/node/Service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: customer 5 | labels: 6 | app: customer 7 | spec: 8 | ports: 9 | - name: http 10 | port: 8080 11 | selector: 12 | app: customer 13 | -------------------------------------------------------------------------------- /istio-tutorial/customer/node/request-module.js: -------------------------------------------------------------------------------- 1 | const request = require("request"); 2 | //const url = "https://maps.googleapis.com/maps/api/geocode/json?address=Florence"; 3 | const url = "http://localhost:8080"; 4 | 5 | request.get(url, (error, response, body) => { 6 | //let json = JSON.parse(body); 7 | console.log( 8 | `City: ` + body.toString() 9 | ); 10 | }); -------------------------------------------------------------------------------- /istio-tutorial/diferencia/Service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: recommendation-diferencia 5 | labels: 6 | app: recommendation-diferencia 7 | spec: 8 | ports: 9 | - name: http 10 | port: 8080 11 | - name: http-admin 12 | port: 8082 13 | selector: 14 | app: recommendation-diferencia -------------------------------------------------------------------------------- /istio-tutorial/diferencia/recommendation-candidate-svc.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: recommendation-candidate 5 | labels: 6 | app: recommendation-candidate 7 | spec: 8 | ports: 9 | - name: http 10 | port: 8080 11 | selector: 12 | app: recommendation 13 | version: v2 -------------------------------------------------------------------------------- /istio-tutorial/diferencia/recommendation-master-svc.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: recommendation-master 5 | labels: 6 | app: recommendation-master 7 | spec: 8 | ports: 9 | - name: http 10 | port: 8080 11 | selector: 12 | app: recommendation 13 | version: v1 -------------------------------------------------------------------------------- /istio-tutorial/diferencia/virtual-service-recommendation-v1-diferencia-mirror-v2.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | namespace: tutorial 6 | spec: 7 | hosts: 8 | - recommendation 9 | http: 10 | - route: 11 | - destination: 12 | host: recommendation 13 | subset: version-v1 14 | mirror: 15 | host: recommendation-diferencia 16 | --- -------------------------------------------------------------------------------- /istio-tutorial/documentation/antora.yml: -------------------------------------------------------------------------------- 1 | name: istio-tutorial 2 | title: Istio Tutorial 3 | version: '1.3.x' 4 | nav: 5 | - modules/ROOT/nav.adoc 6 | - modules/advanced/nav.adoc 7 | 8 | start_page: ROOT:index.adoc -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/_attributes.adoc: -------------------------------------------------------------------------------- 1 | :imagesdir: {moduledir}/assets/images 2 | :source-highlighter: highlightjs -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/grafana1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/grafana1.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/grafana2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/grafana2.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/jaegerUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/jaegerUI.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/keycloak-assign_user_role.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/keycloak-assign_user_role.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/keycloak-create_realm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/keycloak-create_realm.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/keycloak-create_user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/keycloak-create_user.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/keycloak-details_user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/keycloak-details_user.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/keycloak-import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/keycloak-import.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/keycloak-initial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/keycloak-initial.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/keycloak-jwt_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/keycloak-jwt_token.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-application-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-application-details.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-application-health.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-application-health.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-application-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-application-list.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-application-metrics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-application-metrics.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-deployments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-deployments.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-distributed-tracing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-distributed-tracing.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-istio-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-istio-config.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-login.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-retry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-retry.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-service-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-service-details.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-service-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-service-graph.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-service-health.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-service-health.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-service-list-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-service-list-2.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-service-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-service-list.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-source-services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-source-services.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-virtual-services-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-virtual-services-2.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-virtual-services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-virtual-services.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-workload-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-workload-details.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/kiali-workload-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/kiali-workload-list.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/prometheus-memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/prometheus-memory.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/prometheus_custom_metric.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/prometheus_custom_metric.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/siege_cb_503.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/siege_cb_503.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/assets/images/siege_ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/ROOT/assets/images/siege_ok.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/ROOT/pages/_attributes.adoc: -------------------------------------------------------------------------------- 1 | :moduledir: .. 2 | :branch: master 3 | :github-repo: https://github.com/redhat-developer-demos/istio-tutorial/blob/{branch} 4 | :customer-repo: customer 5 | :customer-java: java/quarkus 6 | :preference-repo: preference 7 | :preference-java: java/quarkus 8 | :recommendation-repo: recommendation 9 | :recommendation-java: java/quarkus 10 | :istiofiles-dir: istiofiles 11 | :istio-version: 1.3.0 -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/advanced/assets/images/arquillian_cube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/advanced/assets/images/arquillian_cube.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/advanced/assets/images/diferencia-noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/advanced/assets/images/diferencia-noise.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/advanced/assets/images/diferencia-simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/advanced/assets/images/diferencia-simple.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/advanced/assets/images/promotion-osio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/documentation/modules/advanced/assets/images/promotion-osio.png -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/advanced/pages/_attributes.adoc: -------------------------------------------------------------------------------- 1 | :moduledir: .. 2 | :branch: master 3 | :github-repo: https://github.com/redhat-developer-demos/istio-tutorial/blob/{branch} 4 | :customer-repo: customer 5 | :customer-java: java/springboot 6 | :preference-repo: preference 7 | :preference-java: java/springboot 8 | :recommendation-repo: recommendation 9 | :recommendation-java: java/vertx 10 | :istiofiles-dir: istiofiles 11 | :diferencia-dir: diferencia -------------------------------------------------------------------------------- /istio-tutorial/documentation/modules/advanced/pages/index.adoc: -------------------------------------------------------------------------------- 1 | = Advanced use cases of Istio on Kubernetes/OpenShift 2 | 3 | This section contains advanced use cases for Istio which might go beyond routing or circuit breaker. -------------------------------------------------------------------------------- /istio-tutorial/generate_dev.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | docker run -v `pwd`:/antora --rm -t antora/antora:2.0.0 --pull --stacktrace dev-site.yml 3 | open gh-pages/istio-tutorial/1.3.x/index.html -------------------------------------------------------------------------------- /istio-tutorial/generate_docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | docker run -v `pwd`:/antora --rm -t antora/antora:2.0.0 --pull --stacktrace site-gh-pages.yml 3 | open gh-pages/istio-tutorial/1.1.x/index.html 4 | -------------------------------------------------------------------------------- /istio-tutorial/generate_workshop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | docker run -v `pwd`:/antora --rm -t antora/antora:2.0.0 --pull --stacktrace site-workshop.yml 3 | open gh-pages/workshop/istio-tutorial/1.1.x/index.html 4 | -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/authentication-enable-tls.yml: -------------------------------------------------------------------------------- 1 | apiVersion: "authentication.istio.io/v1alpha1" 2 | kind: "Policy" 3 | metadata: 4 | name: "default" 5 | namespace: "tutorial" 6 | spec: 7 | peers: 8 | - mtls: {} -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/authorization-enable-rbac.yml: -------------------------------------------------------------------------------- 1 | apiVersion: "rbac.istio.io/v1alpha1" 2 | kind: ClusterRbacConfig 3 | metadata: 4 | name: default 5 | spec: 6 | mode: 'ON_WITH_INCLUSION' 7 | inclusion: 8 | namespaces: ["tutorial"] -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/destination-rule-recommendation-v1-v2-v3.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: DestinationRule 3 | metadata: 4 | name: recommendation 5 | spec: 6 | host: recommendation 7 | subsets: 8 | - labels: 9 | version: v1 10 | name: version-v1 11 | - labels: 12 | version: v2 13 | name: version-v2 14 | - labels: 15 | version: v3 16 | name: version-v3 17 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/destination-rule-recommendation-v1-v2.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: DestinationRule 3 | metadata: 4 | name: recommendation 5 | spec: 6 | host: recommendation 7 | subsets: 8 | - labels: 9 | version: v1 10 | name: version-v1 11 | - labels: 12 | version: v2 13 | name: version-v2 14 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/destination-rule-recommendation-v1.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: DestinationRule 3 | metadata: 4 | name: recommendation 5 | spec: 6 | host: recommendation 7 | subsets: 8 | - labels: 9 | version: virtualized 10 | name: version-virtualized 11 | - labels: 12 | version: v1 13 | name: version-v1 -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/destination-rule-recommendation-v4-v5-v6-v7.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: DestinationRule 3 | metadata: 4 | name: recommendation 5 | spec: 6 | host: recommendation 7 | subsets: 8 | - labels: 9 | version: v4 10 | name: version-v4 11 | - labels: 12 | version: v5 13 | name: version-v5 14 | - labels: 15 | version: v6 16 | name: version-v6 17 | - labels: 18 | version: v7 19 | name: version-v7 20 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/destination-rule-recommendation.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: DestinationRule 3 | metadata: 4 | name: recommendation 5 | spec: 6 | host: recommendation 7 | subsets: 8 | - labels: 9 | app: recommendation 10 | name: app-recommendation 11 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/destination-rule-recommendation_lb_policy_app.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: DestinationRule 3 | metadata: 4 | name: recommendation 5 | spec: 6 | host: recommendation 7 | trafficPolicy: 8 | loadBalancer: 9 | simple: RANDOM -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/destination-rule-tls.yml: -------------------------------------------------------------------------------- 1 | apiVersion: "networking.istio.io/v1alpha3" 2 | kind: "DestinationRule" 3 | metadata: 4 | name: "default" 5 | namespace: "tutorial" 6 | spec: 7 | host: "*.tutorial.svc.cluster.local" 8 | trafficPolicy: 9 | tls: 10 | mode: ISTIO_MUTUAL -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/disable-mtls.yml: -------------------------------------------------------------------------------- 1 | apiVersion: "authentication.istio.io/v1alpha1" 2 | kind: "Policy" 3 | metadata: 4 | name: "default" 5 | spec: 6 | peers: 7 | --- 8 | apiVersion: "networking.istio.io/v1alpha3" 9 | kind: "DestinationRule" 10 | metadata: 11 | name: "disable-mtls" 12 | spec: 13 | host: "*" 14 | trafficPolicy: 15 | tls: 16 | mode: DISABLE 17 | -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/enduser-authentication-jwt.yml: -------------------------------------------------------------------------------- 1 | apiVersion: "authentication.istio.io/v1alpha1" 2 | kind: "Policy" 3 | metadata: 4 | name: "customerjwt" 5 | spec: 6 | targets: 7 | - name: customer 8 | - name: preference 9 | - name: recommendation 10 | origins: 11 | - jwt: 12 | issuer: "testing@secure.istio.io" 13 | jwksUri: "https://gist.githubusercontent.com/lordofthejars/7dad589384612d7a6e18398ac0f10065/raw/ea0f8e7b729fb1df25d4dc60bf17dee409aad204/jwks.json" 14 | principalBinding: USE_ORIGIN -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/namespace-rbac-policy-jwt.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.istio.io/v1alpha1 2 | kind: ServiceRole 3 | metadata: 4 | name: customer 5 | spec: 6 | rules: 7 | - services: ["*"] 8 | methods: ["GET"] 9 | --- 10 | apiVersion: rbac.istio.io/v1alpha1 11 | kind: ServiceRoleBinding 12 | metadata: 13 | name: bind-customer 14 | spec: 15 | subjects: 16 | - user: "*" 17 | properties: 18 | request.auth.claims[role]: "customer" 19 | roleRef: 20 | kind: ServiceRole 21 | name: customer -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/namespace-rbac-policy.yml: -------------------------------------------------------------------------------- 1 | apiVersion: "rbac.istio.io/v1alpha1" 2 | kind: ServiceRole 3 | metadata: 4 | name: service-viewer 5 | spec: 6 | rules: 7 | - services: ["*"] 8 | methods: ["GET"] 9 | constraints: 10 | - key: "destination.labels[app]" 11 | values: ["customer", "recommendation", "preference"] 12 | --- 13 | apiVersion: "rbac.istio.io/v1alpha1" 14 | kind: ServiceRoleBinding 15 | metadata: 16 | name: bind-service-viewer 17 | namespace: tutorial 18 | spec: 19 | subjects: 20 | - user: "*" 21 | roleRef: 22 | kind: ServiceRole 23 | name: "service-viewer" -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/service-entry-egress-worldclockapi.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: ServiceEntry 3 | metadata: 4 | name: worldclockapi-egress-rule 5 | spec: 6 | hosts: 7 | - worldclockapi.com 8 | ports: 9 | - name: http-80 10 | number: 80 11 | protocol: http 12 | -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-firefox-recommendation-v2.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - match: 10 | - headers: 11 | baggage-user-agent: 12 | regex: .*Firefox.* 13 | route: 14 | - destination: 15 | host: recommendation 16 | subset: version-v2 17 | - route: 18 | - destination: 19 | host: recommendation 20 | subset: version-v1 21 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-mobile-recommendation-v2.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - match: 10 | - headers: 11 | baggage-user-agent: 12 | regex: .*Mobile.* 13 | route: 14 | - destination: 15 | host: recommendation 16 | subset: version-v2 17 | - route: 18 | - destination: 19 | host: recommendation 20 | subset: version-v1 21 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-promoted-v3.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - match: 10 | - headers: 11 | baggage-user-preference: 12 | prefix: "12" 13 | route: 14 | - destination: 15 | host: recommendation 16 | subset: version-v3 17 | - route: 18 | - destination: 19 | host: recommendation 20 | subset: version-v2 21 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-503.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - fault: 10 | abort: 11 | httpStatus: 503 12 | percent: 50 13 | route: 14 | - destination: 15 | host: recommendation 16 | subset: app-recommendation 17 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-delay.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - fault: 10 | delay: 11 | fixedDelay: 7.000s 12 | percent: 50 13 | route: 14 | - destination: 15 | host: recommendation 16 | subset: app-recommendation 17 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-timeout.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - route: 10 | - destination: 11 | host: recommendation 12 | timeout: 1.000s 13 | -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-v1-mirror-v2.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - route: 10 | - destination: 11 | host: recommendation 12 | subset: version-v1 13 | mirror: 14 | host: recommendation 15 | subset: version-v2 16 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-v1.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - route: 10 | - destination: 11 | host: recommendation 12 | subset: version-v1 13 | weight: 100 14 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-v1_and_v2.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - route: 10 | - destination: 11 | host: recommendation 12 | subset: version-v1 13 | weight: 90 14 | - destination: 15 | host: recommendation 16 | subset: version-v2 17 | weight: 10 18 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-v1_and_v2_50_50.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - route: 10 | - destination: 11 | host: recommendation 12 | subset: version-v1 13 | weight: 50 14 | - destination: 15 | host: recommendation 16 | subset: version-v2 17 | weight: 50 18 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-v1_and_v2_75_25.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - route: 10 | - destination: 11 | host: recommendation 12 | subset: version-v1 13 | weight: 75 14 | - destination: 15 | host: recommendation 16 | subset: version-v2 17 | weight: 25 18 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-v2.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - route: 10 | - destination: 11 | host: recommendation 12 | subset: version-v2 13 | weight: 100 14 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-v2_retry.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - route: 10 | - destination: 11 | host: recommendation 12 | retries: 13 | attempts: 3 14 | perTryTimeout: 2s 15 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-v3.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - route: 10 | - destination: 11 | host: recommendation 12 | subset: version-v3 13 | weight: 100 14 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-v4.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - route: 10 | - destination: 11 | host: recommendation 12 | subset: version-v4 13 | weight: 100 14 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-v5.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - route: 10 | - destination: 11 | host: recommendation 12 | subset: version-v5 13 | weight: 100 14 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-v6.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - route: 10 | - destination: 11 | host: recommendation 12 | subset: version-v6 13 | weight: 100 14 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-v7.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - route: 10 | - destination: 11 | host: recommendation 12 | subset: version-v7 13 | weight: 100 14 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-recommendation-virtualized.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - match: 10 | - sourceLabels: 11 | app: preference 12 | version: v2 13 | route: 14 | - destination: 15 | host: recommendation 16 | subset: version-virtualized 17 | - route: 18 | - destination: 19 | host: recommendation 20 | subset: version-v1 21 | --- -------------------------------------------------------------------------------- /istio-tutorial/istiofiles/virtual-service-safari-recommendation-v2.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | spec: 6 | hosts: 7 | - recommendation 8 | http: 9 | - match: 10 | - headers: 11 | baggage-user-agent: 12 | regex: .*Safari.* 13 | route: 14 | - destination: 15 | host: recommendation 16 | subset: version-v2 17 | - route: 18 | - destination: 19 | host: recommendation 20 | subset: version-v1 21 | --- 22 | -------------------------------------------------------------------------------- /istio-tutorial/keycloak/Service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: keycloak 5 | labels: 6 | app: keycloak 7 | spec: 8 | ports: 9 | - name: http 10 | port: 8080 11 | selector: 12 | app: keycloak -------------------------------------------------------------------------------- /istio-tutorial/preference/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | 12 | ### IntelliJ IDEA ### 13 | .idea 14 | *.iws 15 | *.iml 16 | *.ipr 17 | 18 | ### NetBeans ### 19 | nbproject/private/ 20 | build/ 21 | nbbuild/ 22 | dist/ 23 | nbdist/ 24 | .nb-gradle/ -------------------------------------------------------------------------------- /istio-tutorial/preference/dotnet/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/dotnet/dotnet-20-runtime-rhel7 2 | 3 | ADD bin/Release/netcoreapp2.0/rhel.7-x64/publish/. /app/ 4 | 5 | WORKDIR /app/ 6 | 7 | EXPOSE 5000 8 | 9 | CMD ["scl", "enable", "rh-dotnet20", "--", "dotnet", "preference.dll"] 10 | -------------------------------------------------------------------------------- /istio-tutorial/preference/dotnet/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /istio-tutorial/preference/dotnet/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Warning" 7 | } 8 | }, 9 | "Console": { 10 | "LogLevel": { 11 | "Default": "Warning" 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /istio-tutorial/preference/dotnet/dotnet.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /istio-tutorial/preference/dotnet/pub.sh: -------------------------------------------------------------------------------- 1 | dotnet publish -c Release -r rhel.7-x64 --self-contained=false -------------------------------------------------------------------------------- /istio-tutorial/preference/dotnet/standalone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ASSEMBLY=preference.dll 4 | SCL=rh-dotnet20 5 | DIR="$(dirname "$(readlink -f "$0")")" 6 | 7 | scl enable $SCL -- dotnet "$DIR/$ASSEMBLY" "$@" -------------------------------------------------------------------------------- /istio-tutorial/preference/java/camel-springboot/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /istio-tutorial/preference/java/camel-springboot/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/preference/java/camel-springboot/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /istio-tutorial/preference/java/camel-springboot/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip 2 | -------------------------------------------------------------------------------- /istio-tutorial/preference/java/camel-springboot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.3.1 2 | ENV AB_OFF=true 3 | ENV JAVA_APP_DIR=/deployments 4 | ENV JAEGER_SERVICE_NAME=preference\ 5 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 6 | JAEGER_PROPAGATION=b3\ 7 | JAEGER_SAMPLER_TYPE=const\ 8 | JAEGER_SAMPLER_PARAM=1 9 | EXPOSE 8080 8778 9779 10 | COPY target/preference.jar /deployments/ 11 | -------------------------------------------------------------------------------- /istio-tutorial/preference/java/camel-springboot/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Enable stream caching on all routes 2 | camel.springboot.stream-caching-enabled=true 3 | camel.component.servlet.mapping.context-path=/* 4 | -------------------------------------------------------------------------------- /istio-tutorial/preference/java/microprofile/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.3.1 2 | ENV JAVA_APP_DIR=/deployments 3 | ENV AB_OFF=true 4 | ENV JAEGER_SERVICE_NAME=preference\ 5 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 6 | JAEGER_PROPAGATION=b3\ 7 | JAEGER_SAMPLER_TYPE=const\ 8 | JAEGER_SAMPLER_PARAM=1 9 | EXPOSE 8080 8778 9779 10 | COPY target/preference-swarm.jar /deployments/ 11 | -------------------------------------------------------------------------------- /istio-tutorial/preference/java/microprofile/src/main/java/com/redhat/developer/demos/preference/rest/PreferenceApplication.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.preference.rest; 2 | 3 | import javax.ws.rs.ApplicationPath; 4 | import javax.ws.rs.core.Application; 5 | 6 | @ApplicationPath("/") 7 | public class PreferenceApplication extends Application { 8 | 9 | public PreferenceApplication() { 10 | } 11 | } -------------------------------------------------------------------------------- /istio-tutorial/preference/java/microprofile/src/main/resources/META-INF/microprofile-config.properties: -------------------------------------------------------------------------------- 1 | recommendations.api.url=http://recommendation:8080 -------------------------------------------------------------------------------- /istio-tutorial/preference/java/quarkus/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /istio-tutorial/preference/java/quarkus/src/main/docker/Dockerfile.jvm: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.5.4 2 | ENV JAVA_OPTIONS=-Dquarkus.http.host=0.0.0.0 3 | ENV JAEGER_SERVICE_NAME=preference \ 4 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces \ 5 | JAEGER_PROPAGATION=b3 \ 6 | JAEGER_SAMPLER_TYPE=const \ 7 | JAEGER_SAMPLER_PARAM=1 8 | EXPOSE 8080 8778 9779 9 | COPY target/lib/* /deployments/lib/ 10 | COPY target/*-runner.jar /deployments/app.jar 11 | ENTRYPOINT [ "/deployments/run-java.sh" ] -------------------------------------------------------------------------------- /istio-tutorial/preference/java/quarkus/src/main/docker/Dockerfile.native: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | ENV JAEGER_SERVICE_NAME=preference\ 3 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 4 | JAEGER_PROPAGATION=b3\ 5 | JAEGER_SAMPLER_TYPE=const\ 6 | JAEGER_SAMPLER_PARAM=1 7 | WORKDIR /work/ 8 | COPY target/*-runner /work/preference 9 | RUN chmod 775 /work 10 | EXPOSE 8080 8778 9779 11 | CMD ["./preference", "-Dquarkus.http.host=0.0.0.0", "-Xmx8m", "-Xmn8m", "-Xms8m"] -------------------------------------------------------------------------------- /istio-tutorial/preference/java/quarkus/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | org.eclipse.microprofile.rest.client.propagateHeaders=baggage-user-agent 2 | com.redhat.developer.demos.preference.rest.RecommendationService/mp-rest/url=http://recommendation:8080 -------------------------------------------------------------------------------- /istio-tutorial/preference/java/quarkus/src/test/java/com/redhat/developer/demos/preference/rest/NativePreferenceResourceIT.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.preference.rest; 2 | 3 | import io.quarkus.test.junit.NativeImageTest; 4 | 5 | @NativeImageTest 6 | public class NativePreferenceResourceIT extends PreferenceResourceTest { 7 | 8 | // Execute the same tests but in native mode. 9 | } -------------------------------------------------------------------------------- /istio-tutorial/preference/java/springboot/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/preference/java/springboot/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /istio-tutorial/preference/java/springboot/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip 2 | -------------------------------------------------------------------------------- /istio-tutorial/preference/java/springboot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.5.2 2 | ENV JAVA_APP_DIR=/deployments 3 | ENV JAEGER_SERVICE_NAME=preference \ 4 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces \ 5 | JAEGER_PROPAGATION=b3 \ 6 | JAEGER_SAMPLER_TYPE=const \ 7 | JAEGER_SAMPLER_PARAM=1 8 | EXPOSE 8080 8778 9779 9 | COPY target/preference.jar /deployments/ 10 | -------------------------------------------------------------------------------- /istio-tutorial/preference/java/springboot/src/main/resources/application-local.properties: -------------------------------------------------------------------------------- 1 | recommendations.api.url=http://localhost:8080 2 | server.port=8180 -------------------------------------------------------------------------------- /istio-tutorial/preference/java/springboot/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | recommendations.api.url=http://recommendation:8080 2 | endpoints.health.enabled=false -------------------------------------------------------------------------------- /istio-tutorial/preference/java/springboot/src/test/java/com/redhat/developer/demos/preference/PreferencesApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.preference; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class PreferencesApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /istio-tutorial/preference/java/springboot/trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/preference/java/springboot/trace.png -------------------------------------------------------------------------------- /istio-tutorial/preference/kubernetes/Service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: preference 5 | labels: 6 | app: preference 7 | spec: 8 | ports: 9 | - name: http 10 | port: 8080 11 | selector: 12 | app: preference 13 | -------------------------------------------------------------------------------- /istio-tutorial/preference/node/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:6.9.2 2 | #FROM rhscl/nodejs-6-rhel7 3 | 4 | # Create directory for application 5 | RUN mkdir -p /usr/src/app 6 | WORKDIR /usr/src/app 7 | 8 | # Dependencies are installed here 9 | COPY package.json /usr/src/app/ 10 | RUN npm install 11 | 12 | # App sourcd 13 | COPY . /usr/src/app/ 14 | 15 | EXPOSE 8080 16 | CMD ["node", "preference.js"] 17 | -------------------------------------------------------------------------------- /istio-tutorial/preference/node/Service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: preference 5 | labels: 6 | app: preference 7 | spec: 8 | ports: 9 | - name: http 10 | port: 8080 11 | selector: 12 | app: preference 13 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | 12 | ### IntelliJ IDEA ### 13 | .idea 14 | *.iws 15 | *.iml 16 | *.ipr 17 | 18 | ### NetBeans ### 19 | nbproject/private/ 20 | build/ 21 | nbbuild/ 22 | dist/ 23 | nbdist/ 24 | .nb-gradle/ -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/camel-springboot/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/camel-springboot/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/recommendation/java/camel-springboot/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/camel-springboot/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip 2 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/camel-springboot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.3.1 2 | ENV AB_OFF=true 3 | ENV JAVA_APP_DIR=/deployments 4 | ENV JAEGER_SERVICE_NAME=recommendation\ 5 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 6 | JAEGER_PROPAGATION=b3\ 7 | JAEGER_SAMPLER_TYPE=const\ 8 | JAEGER_SAMPLER_PARAM=1 9 | EXPOSE 8080 8778 9779 10 | COPY target/recommendation.jar /deployments/ 11 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/camel-springboot/src/main/java/com/redhat/developer/demos/RecommendationApplication.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class RecommendationApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(RecommendationApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/camel-springboot/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Enable stream caching on all routes 2 | camel.springboot.stream-caching-enabled=true 3 | camel.component.servlet.mapping.context-path=/* 4 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/microprofile/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.3.1 2 | ENV JAVA_APP_DIR=/deployments 3 | ENV AB_OFF=true 4 | ENV JAEGER_SERVICE_NAME=recommendation\ 5 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 6 | JAEGER_PROPAGATION=b3\ 7 | JAEGER_SAMPLER_TYPE=const\ 8 | JAEGER_SAMPLER_PARAM=1 9 | EXPOSE 8080 8778 9779 10 | COPY target/recommendation-swarm.jar /deployments/ 11 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/microprofile/src/main/java/com/redhat/developer/demos/recommendation/rest/RecommendationApplication.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.recommendation.rest; 2 | 3 | import javax.ws.rs.ApplicationPath; 4 | import javax.ws.rs.core.Application; 5 | 6 | @ApplicationPath("/") 7 | public class RecommendationApplication extends Application { 8 | 9 | public RecommendationApplication() { 10 | } 11 | } -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/quarkus/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/quarkus/src/main/docker/Dockerfile.jvm: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.5.4 2 | ENV JAVA_OPTIONS=-Dquarkus.http.host=0.0.0.0 3 | ENV JAEGER_SERVICE_NAME=recommendation \ 4 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces \ 5 | JAEGER_PROPAGATION=b3 \ 6 | JAEGER_SAMPLER_TYPE=const \ 7 | JAEGER_SAMPLER_PARAM=1 8 | EXPOSE 8080 8778 9779 9 | COPY target/lib/* /deployments/lib/ 10 | COPY target/*-runner.jar /deployments/app.jar 11 | ENTRYPOINT [ "/deployments/run-java.sh" ] -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/quarkus/src/main/docker/Dockerfile.native: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | ENV JAEGER_SERVICE_NAME=recommendation\ 3 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 4 | JAEGER_PROPAGATION=b3\ 5 | JAEGER_SAMPLER_TYPE=const\ 6 | JAEGER_SAMPLER_PARAM=1 7 | WORKDIR /work/ 8 | COPY target/*-runner /work/recommendation 9 | RUN chmod 775 /work 10 | EXPOSE 8080 8778 9779 11 | CMD ["./recommendation", "-Dquarkus.http.host=0.0.0.0", "-Xmx8m", "-Xmn8m", "-Xms8m"] -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/quarkus/src/test/java/com/redhat/developer/demos/recommendation/rest/NativeRecommendationResourceIT.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.recommendation.rest; 2 | 3 | import io.quarkus.test.junit.NativeImageTest; 4 | 5 | @NativeImageTest 6 | public class NativeRecommendationResourceIT extends RecommendationResourceTest { 7 | 8 | // Execute the same tests but in native mode. 9 | } -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/springboot/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/recommendation/java/springboot/.gitkeep -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/springboot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.5.2 2 | ENV JAVA_APP_DIR=/deployments 3 | EXPOSE 8080 8778 9779 4 | COPY target/recommendation.jar /deployments/ 5 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/springboot/src/main/java/com/redhat/developer/demos/recommendation/RecommendationApplication.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.recommendation; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class RecommendationApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(RecommendationApplication.class, args); 11 | } 12 | } -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/springboot/src/main/resources/application-local.properties: -------------------------------------------------------------------------------- 1 | server.port=8080 -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/springboot/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | logging.level.com.example.recommendation=DEBUG 2 | endpoints.health.enabled=false -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/vertx/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/recommendation/java/vertx/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/vertx/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip 2 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/vertx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.5.2 2 | ENV JAVA_APP_DIR=/deployments 3 | EXPOSE 8080 8778 9779 4 | COPY target/recommendation.jar /deployments/ 5 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/vertx/maven/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/recommendation/java/vertx/maven/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/vertx/maven/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repository.apache.org/content/repositories/releases/org/apache/maven/apache-maven/3.2.3/apache-maven-3.2.3-bin.zip -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/vertx/src/main/resources/db/migration/V1__Create_recommendation_table.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE recommendation ( 2 | id SERIAL PRIMARY KEY, 3 | name VARCHAR(100) NOT NULL 4 | ); 5 | 6 | INSERT INTO recommendation(name) 7 | VALUES ('Star Wars: A New Hope'); 8 | 9 | INSERT INTO recommendation(name) 10 | VALUES ('Star Trek: First Contact'); 11 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/vertx/src/main/sql/V2__Add_movie_column_in_recommendation_table.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE recommendation ADD movie_name varchar(100); -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/vertx/src/main/sql/V3__Update_recommendation_data.sql: -------------------------------------------------------------------------------- 1 | UPDATE recommendation SET movie_name = name -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/vertx/src/main/sql/V4__Update_movie_name_constraints.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE recommendation ALTER COLUMN name DROP not null; 2 | ALTER TABLE recommendation ALTER COLUMN movie_name SET not null; 3 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/vertx/src/test/resources/arquillian.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | tutorial 9 | false 10 | 11 | 12 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/vertx/src/test/resources/dark-launch-redirect-traffic-to-new-version.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | creationTimestamp: null 5 | name: recommendation 6 | namespace: tutorial 7 | spec: 8 | hosts: 9 | - recommendation 10 | http: 11 | - match: 12 | - headers: 13 | baggage-user-agent: 14 | regex: .*DarkLaunch.* 15 | route: 16 | - destination: 17 | host: recommendation 18 | subset: version-v2 19 | - route: 20 | - destination: 21 | host: recommendation 22 | subset: version-v1 -------------------------------------------------------------------------------- /istio-tutorial/recommendation/java/vertx/src/test/resources/virtual-service-recommendation-v1.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1alpha3 2 | kind: VirtualService 3 | metadata: 4 | name: recommendation 5 | namespace: tutorial 6 | spec: 7 | hosts: 8 | - recommendation 9 | http: 10 | - route: 11 | - destination: 12 | host: recommendation 13 | subset: version-v1 14 | weight: 100 15 | --- -------------------------------------------------------------------------------- /istio-tutorial/recommendation/kubernetes/PostgreSQL-service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: postgres 5 | labels: 6 | app: postgres 7 | spec: 8 | ports: 9 | - port: 5432 10 | protocol: TCP 11 | selector: 12 | app: postgres -------------------------------------------------------------------------------- /istio-tutorial/recommendation/kubernetes/Service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: recommendation 5 | labels: 6 | app: recommendation 7 | spec: 8 | ports: 9 | - name: http 10 | port: 8080 11 | selector: 12 | app: recommendation 13 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/node/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:6.9.2 2 | #FROM rhscl/nodejs-6-rhel7 3 | 4 | # Create directory for application 5 | RUN mkdir -p /usr/src/app 6 | WORKDIR /usr/src/app 7 | 8 | # Dependencies are installed here 9 | COPY package.json /usr/src/app/ 10 | RUN npm install 11 | 12 | # App sourcd 13 | COPY . /usr/src/app/ 14 | 15 | EXPOSE 8080 16 | CMD ["node", "recommendation.js"] 17 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/node/Service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: recommendation 5 | labels: 6 | app: recommendation 7 | spec: 8 | ports: 9 | - name: http 10 | port: 8080 11 | selector: 12 | app: recommendation 13 | -------------------------------------------------------------------------------- /istio-tutorial/recommendation/virtualized/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM spectolabs/hoverfly:v0.16.0 2 | 3 | RUN apt-get update && apt-get install -y \ 4 | curl 5 | 6 | EXPOSE 8080 8888 7 | 8 | ADD simulation.json /go/bin 9 | 10 | ENTRYPOINT ["/go/bin/hoverfly", "-listen-on-host=0.0.0.0", "-webserver", "-pp=8080"] 11 | CMD [""] -------------------------------------------------------------------------------- /istio-tutorial/scripts/blue-green-recommendation-v1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | kubectl replace -f istiofiles/virtual-service-recommendation-v1.yml -n tutorial 3 | -------------------------------------------------------------------------------- /istio-tutorial/scripts/blue-green-recommendation-v2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | kubectl create -f istiofiles/destination-rule-recommendation-v1-v2.yml -n tutorial 3 | kubectl create -f istiofiles/virtual-service-recommendation-v2.yml -n tutorial -------------------------------------------------------------------------------- /istio-tutorial/scripts/canary-75-25.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | kubectl replace -f istiofiles/virtual-service-recommendation-v1_and_v2_75_25.yml -n tutorial -------------------------------------------------------------------------------- /istio-tutorial/scripts/canary-90-10.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | kubectl create -f istiofiles/destination-rule-recommendation-v1-v2.yml -n tutorial 3 | kubectl create -f istiofiles/virtual-service-recommendation-v1_and_v2.yml -n tutorial -------------------------------------------------------------------------------- /istio-tutorial/scripts/canary-user-agent.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./scripts/clean.sh 3 | kubectl create -f istiofiles/destination-rule-recommendation-v1-v2.yml -n tutorial 4 | kubectl create -f istiofiles/virtual-service-recommendation-v1.yml -n tutorial 5 | kubectl replace -f istiofiles/virtual-service-safari-recommendation-v2.yml -n tutorial 6 | -------------------------------------------------------------------------------- /istio-tutorial/scripts/darklaunch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./scripts/clean.sh 3 | kubectl create -f istiofiles/destination-rule-recommendation-v1-v2.yml -n tutorial 4 | kubectl create -f istiofiles/virtual-service-recommendation-v1-mirror-v2.yml -n tutorial -------------------------------------------------------------------------------- /istio-tutorial/scripts/delay.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./scripts/clean.sh 3 | kubectl create -f istiofiles/virtual-service-recommendation-delay.yml -n tutorial 4 | kubectl create -f istiofiles/destination-rule-recommendation.yml -n tutorial -------------------------------------------------------------------------------- /istio-tutorial/scripts/egress-access.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | oc exec -it $(oc get pods -n tutorial|grep recommendation-v2|awk '{ print $1 }'|head -1) -n tutorial -c recommendation -- curl -v http://worldclockapi.com/api/json/cet/now -------------------------------------------------------------------------------- /istio-tutorial/scripts/egress-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | kubectl create -f istiofiles/service-entry-egress-worldclockapi.yml -n tutorial -------------------------------------------------------------------------------- /istio-tutorial/scripts/error-503-50.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./scripts/clean.sh 3 | kubectl create -f istiofiles/destination-rule-recommendation.yml -n tutorial 4 | kubectl create -f istiofiles/virtual-service-recommendation-503.yml -n tutorial -------------------------------------------------------------------------------- /istio-tutorial/scripts/pool-ejection.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | oc scale deployment recommendation-v2 --replicas=2 -n tutorial 3 | ./scripts/clean.sh 4 | kubectl create -f istiofiles/destination-rule-recommendation-v1-v2.yml -n tutorial 5 | kubectl create -f istiofiles/virtual-service-recommendation-v1_and_v2_50_50.yml -n tutorial 6 | kubectl replace -f istiofiles/destination-rule-recommendation_cb_policy_pool_ejection.yml -n tutorial -------------------------------------------------------------------------------- /istio-tutorial/scripts/retry-fail.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./scripts/clean.sh 3 | oc exec -it $(oc get pods -n tutorial|grep recommendation-v2|awk '{ print $1 }'|head -1) -n tutorial -c recommendation curl localhost:8080/misbehave -------------------------------------------------------------------------------- /istio-tutorial/scripts/retry-fix.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | oc exec -it $(oc get pods -n tutorial|grep recommendation-v2|awk '{ print $1 }'|head -1) -n tutorial -c recommendation curl localhost:8080/behave -------------------------------------------------------------------------------- /istio-tutorial/scripts/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | url=$1 4 | if [ -z "$url" ] 5 | then 6 | url="istio-ingressgateway-istio-system.$(minishift ip).nip.io/customer" 7 | fi 8 | 9 | while true 10 | do curl $url 11 | sleep .5 12 | done -------------------------------------------------------------------------------- /istio-tutorial/supplemental-ui/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/istio-tutorial/supplemental-ui/img/favicon.ico -------------------------------------------------------------------------------- /istio-tutorial/supplemental-ui/partials/footer-content.hbs: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /istio-tutorial/supplemental-ui/partials/head-meta.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /kiali-ge/czech/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | WORKDIR /work/ 3 | COPY target/*-runner /work/application 4 | RUN chmod 775 /work 5 | EXPOSE 8080 6 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /kiali-ge/czech/src/main/java/com/redhat/training/czech/CzechService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.czech; 2 | 3 | import javax.enterprise.context.ApplicationScoped; 4 | import javax.ws.rs.GET; 5 | import javax.ws.rs.Path; 6 | import javax.ws.rs.Produces; 7 | import javax.ws.rs.core.MediaType; 8 | 9 | @Path("/") 10 | @ApplicationScoped 11 | public class CzechService { 12 | 13 | String message = "Ahoj světe!"; 14 | 15 | @GET 16 | @Produces(MediaType.TEXT_PLAIN) 17 | public String sayAhoj() { 18 | 19 | return message; 20 | } 21 | } -------------------------------------------------------------------------------- /kiali-ge/czech/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | quarkus.http.port=8080 2 | quarkus.package.uber-jar=true 3 | quarkus.http.cors=true 4 | quarkus.http.cors.methods=GET,PUT,POST,DELETE 5 | quarkus.http.cors.headers=X-Custom 6 | quarkus.http.cors.exposed-headers=Content-Disposition -------------------------------------------------------------------------------- /kiali-ge/english-v1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | WORKDIR /work/ 3 | COPY target/*-runner /work/application 4 | RUN chmod 775 /work 5 | EXPOSE 8080 6 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /kiali-ge/english-v1/src/main/java/com/redhat/training/english/SpanishService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.english; 2 | 3 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.Produces; 8 | import javax.ws.rs.core.MediaType; 9 | 10 | @RegisterRestClient 11 | public interface SpanishService { 12 | 13 | @Path("/") 14 | @GET 15 | @Produces(MediaType.TEXT_PLAIN) 16 | public String sayHola(); 17 | 18 | @Path("/chained") 19 | @GET 20 | @Produces(MediaType.TEXT_PLAIN) 21 | public String chainedGreeting(); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /kiali-ge/english-v1/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | quarkus.http.port=8080 2 | quarkus.package.uber-jar=true 3 | quarkus.http.cors=true 4 | quarkus.http.cors.methods=GET,PUT,POST,DELETE 5 | quarkus.http.cors.headers=X-Custom 6 | quarkus.http.cors.exposed-headers=Content-Disposition 7 | 8 | com.redhat.training.english.SpanishService/mp-rest/url=http://spanish:8080 9 | -------------------------------------------------------------------------------- /kiali-ge/english-v2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | WORKDIR /work/ 3 | COPY target/*-runner /work/application 4 | RUN chmod 775 /work 5 | EXPOSE 8080 6 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /kiali-ge/english-v2/src/main/java/com/redhat/training/english/SpanishService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.english; 2 | 3 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.Produces; 8 | import javax.ws.rs.core.MediaType; 9 | 10 | @RegisterRestClient 11 | public interface SpanishService { 12 | 13 | @Path("/") 14 | @GET 15 | @Produces(MediaType.TEXT_PLAIN) 16 | public String sayHola(); 17 | 18 | @Path("/chained") 19 | @GET 20 | @Produces(MediaType.TEXT_PLAIN) 21 | public String chainedGreeting(); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /kiali-ge/english-v2/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | quarkus.http.port=8080 2 | quarkus.package.uber-jar=true 3 | quarkus.http.cors=true 4 | quarkus.http.cors.methods=GET,PUT,POST,DELETE 5 | quarkus.http.cors.headers=X-Custom 6 | quarkus.http.cors.exposed-headers=Content-Disposition 7 | 8 | com.redhat.training.english.SpanishService/mp-rest/url=http://spanish:8080 9 | -------------------------------------------------------------------------------- /kiali-ge/greet-api/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | WORKDIR /work/ 3 | COPY target/*-runner /work/application 4 | RUN chmod 775 /work 5 | EXPOSE 8080 6 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /kiali-ge/greet-api/src/main/java/com/redhat/training/api/CzechService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.api; 2 | 3 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.Produces; 8 | import javax.ws.rs.core.MediaType; 9 | 10 | @RegisterRestClient 11 | public interface CzechService { 12 | 13 | @Path("/") 14 | @GET 15 | @Produces(MediaType.TEXT_PLAIN) 16 | public String sayAhoj(); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /kiali-ge/greet-api/src/main/java/com/redhat/training/api/EnglishService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.api; 2 | 3 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.Produces; 8 | import javax.ws.rs.core.MediaType; 9 | 10 | @RegisterRestClient 11 | public interface EnglishService { 12 | 13 | @Path("/") 14 | @GET 15 | @Produces(MediaType.TEXT_PLAIN) 16 | public String sayHello(); 17 | 18 | @Path("/chained") 19 | @GET 20 | @Produces(MediaType.TEXT_PLAIN) 21 | public String chainedGreeting(); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /kiali-ge/greet-api/src/main/java/com/redhat/training/api/SpanishService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.api; 2 | 3 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.Produces; 8 | import javax.ws.rs.core.MediaType; 9 | 10 | @RegisterRestClient 11 | public interface SpanishService { 12 | 13 | @Path("/") 14 | @GET 15 | @Produces(MediaType.TEXT_PLAIN) 16 | public String sayHola(); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /kiali-ge/greet-api/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | quarkus.http.port=8080 2 | quarkus.package.uber-jar=true 3 | quarkus.http.cors=true 4 | quarkus.http.cors.methods=GET,PUT,POST,DELETE 5 | quarkus.http.cors.headers=X-Custom 6 | quarkus.http.cors.exposed-headers=Content-Disposition 7 | 8 | com.redhat.training.api.EnglishService/mp-rest/url=http://english:8080 9 | com.redhat.training.api.SpanishService/mp-rest/url=http://spanish:8080 10 | com.redhat.training.api.CzechService/mp-rest/url=http://czech:8080 11 | -------------------------------------------------------------------------------- /kiali-ge/spanish/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | WORKDIR /work/ 3 | COPY target/*-runner /work/application 4 | RUN chmod 775 /work 5 | EXPOSE 8080 6 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /kiali-ge/spanish/src/main/java/com/redhat/training/spanish/CzechService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.spanish; 2 | 3 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.Produces; 8 | import javax.ws.rs.core.MediaType; 9 | 10 | @RegisterRestClient 11 | public interface CzechService { 12 | 13 | @Path("/") 14 | @GET 15 | @Produces(MediaType.TEXT_PLAIN) 16 | public String sayAhoj(); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /kiali-ge/spanish/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | quarkus.http.port=8080 2 | quarkus.package.uber-jar=true 3 | quarkus.http.cors=true 4 | quarkus.http.cors.methods=GET,PUT,POST,DELETE 5 | quarkus.http.cors.headers=X-Custom 6 | quarkus.http.cors.exposed-headers=Content-Disposition 7 | 8 | com.redhat.training.spanish.CzechService/mp-rest/url=http://czech:8080 9 | -------------------------------------------------------------------------------- /maven-simplest-v2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jre-alpine 2 | 3 | ENV VERTICLE_FILE maven-simplest-3.9.0-fat.jar 4 | 5 | # Set the location of the verticles 6 | ENV VERTICLE_HOME /usr/verticles 7 | 8 | EXPOSE 8080 9 | 10 | COPY target/$VERTICLE_FILE $VERTICLE_HOME/ 11 | 12 | # Launch the verticle 13 | WORKDIR $VERTICLE_HOME 14 | 15 | ENTRYPOINT ["sh", "-c"] 16 | 17 | CMD ["exec java -jar $VERTICLE_FILE"] 18 | -------------------------------------------------------------------------------- /maven-simplest-v2/src/main/java/io/vertx/example/HelloRedHatEmbedded.java: -------------------------------------------------------------------------------- 1 | package io.vertx.example; 2 | 3 | import io.vertx.core.Vertx; 4 | 5 | public class HelloRedHatEmbedded { 6 | public static void main(String[] args) { 7 | Vertx.vertx().createHttpServer().requestHandler(req -> req.response().end("Hello Red Hat!\n")).listen(8080); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /maven-simplest/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jre-alpine 2 | 3 | ENV VERTICLE_FILE maven-simplest-3.9.0-fat.jar 4 | 5 | # Set the location of the verticles 6 | ENV VERTICLE_HOME /usr/verticles 7 | 8 | EXPOSE 8080 9 | 10 | COPY target/$VERTICLE_FILE $VERTICLE_HOME/ 11 | 12 | # Launch the verticle 13 | WORKDIR $VERTICLE_HOME 14 | 15 | ENTRYPOINT ["sh", "-c"] 16 | 17 | CMD ["exec java -jar $VERTICLE_FILE"] 18 | -------------------------------------------------------------------------------- /maven-simplest/src/main/java/io/vertx/example/HelloWorldEmbedded.java: -------------------------------------------------------------------------------- 1 | package io.vertx.example; 2 | 3 | import io.vertx.core.Vertx; 4 | 5 | 6 | /** 7 | * @author Tim Fox 8 | */ 9 | public class HelloWorldEmbedded { 10 | 11 | public static void main(String[] args) { 12 | // Create an HTTP server which simply returns "Hello World!" to each request. 13 | Vertx.vertx().createHttpServer().requestHandler(req -> req.response().end("Hello World!\n")).listen(8080); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /metrics-ge/order/.gitignore: -------------------------------------------------------------------------------- 1 | .classpath 2 | .settings 3 | .vscode 4 | .project 5 | target 6 | -------------------------------------------------------------------------------- /metrics-ge/order/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | quarkus.http.port=8080 2 | quarkus.package.uber-jar=true 3 | quarkus.http.cors=true 4 | quarkus.http.cors.methods=GET,PUT,POST,DELETE 5 | quarkus.http.cors.headers=X-Custom 6 | quarkus.http.cors.exposed-headers=Content-Disposition 7 | -------------------------------------------------------------------------------- /metrics-ge/product/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /metrics-ge/product/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/nodejs-12 2 | 3 | COPY package.json package-lock.json ./ 4 | RUN npm ci 5 | 6 | COPY . ./ 7 | 8 | EXPOSE 8080 9 | CMD ["node", "server.js"] 10 | -------------------------------------------------------------------------------- /metrics-ge/product/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "product", 3 | "version": "1.0.0", 4 | "engines": { 5 | "node": ">=6.4.0" 6 | }, 7 | "description": "A product service for an online shop using Node.js", 8 | "keywords": [], 9 | "author": "Ravi Srinivasan", 10 | "dependencies": { 11 | "express": "^4.16" 12 | }, 13 | "devDependencies": {}, 14 | "scripts": {} 15 | } 16 | -------------------------------------------------------------------------------- /payments/gateway-v1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | WORKDIR /work/ 3 | COPY target/*-runner /work/application 4 | RUN chmod 775 /work 5 | EXPOSE 8080 6 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /payments/gateway-v1/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | quarkus.http.port=8080 2 | quarkus.package.uber-jar=true 3 | quarkus.http.cors=true 4 | quarkus.http.cors.methods=GET,PUT,POST,DELETE 5 | quarkus.http.cors.headers=X-Custom 6 | quarkus.http.cors.exposed-headers=Content-Disposition 7 | 8 | -------------------------------------------------------------------------------- /payments/gateway-v2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | WORKDIR /work/ 3 | COPY target/*-runner /work/application 4 | RUN chmod 775 /work 5 | EXPOSE 8080 6 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /payments/gateway-v2/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | quarkus.http.port=8080 2 | quarkus.package.uber-jar=true 3 | quarkus.http.cors=true 4 | quarkus.http.cors.methods=GET,PUT,POST,DELETE 5 | quarkus.http.cors.headers=X-Custom 6 | quarkus.http.cors.exposed-headers=Content-Disposition 7 | 8 | -------------------------------------------------------------------------------- /payments/payment-v1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | WORKDIR /work/ 3 | COPY target/*-runner /work/application 4 | RUN chmod 775 /work 5 | EXPOSE 8080 6 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /payments/payment-v1/src/main/java/com/redhat/training/payment/PaymentGatewayService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.payment; 2 | 3 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.PathParam; 8 | import javax.ws.rs.Produces; 9 | import javax.ws.rs.core.MediaType; 10 | 11 | @RegisterRestClient 12 | public interface PaymentGatewayService { 13 | 14 | @Path("/processPayment/{amount}") 15 | @GET 16 | @Produces(MediaType.TEXT_PLAIN) 17 | public String processPayment(@PathParam("amount") String amount); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /payments/payment-v1/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | quarkus.http.port=8080 2 | quarkus.package.uber-jar=true 3 | quarkus.http.cors=true 4 | quarkus.http.cors.methods=GET,PUT,POST,DELETE 5 | quarkus.http.cors.headers=X-Custom 6 | quarkus.http.cors.exposed-headers=Content-Disposition 7 | 8 | com.redhat.training.payment.PaymentGatewayService/mp-rest/url=http://gateway:8080 9 | -------------------------------------------------------------------------------- /payments/payment-v2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | WORKDIR /work/ 3 | COPY target/*-runner /work/application 4 | RUN chmod 775 /work 5 | EXPOSE 8080 6 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -------------------------------------------------------------------------------- /payments/payment-v2/src/main/java/com/redhat/training/payment/PaymentGatewayService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.payment; 2 | 3 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.PathParam; 8 | import javax.ws.rs.Produces; 9 | import javax.ws.rs.core.MediaType; 10 | 11 | @RegisterRestClient 12 | public interface PaymentGatewayService { 13 | 14 | @Path("/processPayment/{amount}") 15 | @GET 16 | @Produces(MediaType.TEXT_PLAIN) 17 | public String processPayment(@PathParam("amount") String amount); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /payments/payment-v2/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | quarkus.http.port=8080 2 | quarkus.package.uber-jar=true 3 | quarkus.http.cors=true 4 | quarkus.http.cors.methods=GET,PUT,POST,DELETE 5 | quarkus.http.cors.headers=X-Custom 6 | quarkus.http.cors.exposed-headers=Content-Disposition 7 | 8 | com.redhat.training.payment.PaymentGatewayService/mp-rest/url=http://gateway:8080 9 | -------------------------------------------------------------------------------- /preference/quarkus/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /preference/quarkus/src/main/docker/Dockerfile.jvm: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.5.4 2 | ENV JAVA_OPTIONS=-Dquarkus.http.host=0.0.0.0 3 | ENV JAEGER_SERVICE_NAME=preference \ 4 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces \ 5 | JAEGER_PROPAGATION=b3 \ 6 | JAEGER_SAMPLER_TYPE=const \ 7 | JAEGER_SAMPLER_PARAM=1 8 | EXPOSE 8080 8778 9779 9 | COPY target/lib/* /deployments/lib/ 10 | COPY target/*-runner.jar /deployments/app.jar 11 | ENTRYPOINT [ "/deployments/run-java.sh" ] -------------------------------------------------------------------------------- /preference/quarkus/src/main/docker/Dockerfile.native: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | ENV JAEGER_SERVICE_NAME=preference\ 3 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 4 | JAEGER_PROPAGATION=b3\ 5 | JAEGER_SAMPLER_TYPE=const\ 6 | JAEGER_SAMPLER_PARAM=1 7 | WORKDIR /work/ 8 | COPY target/*-runner /work/preference 9 | RUN chmod 775 /work 10 | EXPOSE 8080 8778 9779 11 | CMD ["./preference", "-Dquarkus.http.host=0.0.0.0", "-Xmx8m", "-Xmn8m", "-Xms8m"] -------------------------------------------------------------------------------- /preference/quarkus/src/main/java/com/redhat/developer/demos/preference/rest/RecommendationService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.preference.rest; 2 | 3 | import org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders; 4 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.Produces; 9 | 10 | @RegisterClientHeaders(BaggageHeadersFactory.class) 11 | @RegisterRestClient 12 | public interface RecommendationService { 13 | 14 | @Path("/") 15 | @GET 16 | @Produces("text/plain") 17 | public String getRecommendation(); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /preference/quarkus/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | org.eclipse.microprofile.rest.client.propagateHeaders=baggage-user-agent 2 | com.redhat.developer.demos.preference.rest.RecommendationService/mp-rest/url=http://recommendation:8080 -------------------------------------------------------------------------------- /preference/quarkus/src/test/java/com/redhat/developer/demos/preference/rest/NativePreferenceResourceIT.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.preference.rest; 2 | 3 | import io.quarkus.test.junit.NativeImageTest; 4 | 5 | @NativeImageTest 6 | public class NativePreferenceResourceIT extends PreferenceResourceTest { 7 | 8 | // Execute the same tests but in native mode. 9 | } -------------------------------------------------------------------------------- /preference/quarkus/src/test/java/com/redhat/developer/demos/preference/rest/PreferenceResourceTest.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.preference.rest; 2 | 3 | import io.quarkus.test.junit.QuarkusTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static io.restassured.RestAssured.given; 7 | import static org.hamcrest.CoreMatchers.startsWith; 8 | 9 | @QuarkusTest 10 | public class PreferenceResourceTest { 11 | 12 | @Test 13 | public void testHelloEndpoint() { 14 | given() 15 | .when().get("/") 16 | .then() 17 | .statusCode(503) 18 | .body(startsWith("preference =>")); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /python-flask-ab-proxy/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # IDEs 4 | .idea 5 | 6 | # dependencies 7 | /venv 8 | __pycache__ 9 | 10 | # misc 11 | .DS_Store 12 | -------------------------------------------------------------------------------- /python-flask-ab-proxy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/python-36 2 | 3 | ENV FLASK_APP="ab-proxy.py" 4 | 5 | COPY src /app 6 | COPY requirements.txt /app 7 | 8 | WORKDIR /app 9 | 10 | RUN pip install -r requirements.txt 11 | 12 | EXPOSE 5000 13 | 14 | CMD [ "flask", "run", "--host=0.0.0.0"] 15 | -------------------------------------------------------------------------------- /python-flask-ab-proxy/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask 2 | requests -------------------------------------------------------------------------------- /python-flask-ab-proxy/src/data/headers.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /python-flask-gossip/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # IDEs 4 | .idea 5 | 6 | # dependencies 7 | /venv 8 | __pycache__ 9 | 10 | # misc 11 | .DS_Store 12 | -------------------------------------------------------------------------------- /python-flask-gossip/v1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/python-36 2 | 3 | ENV FLASK_APP="gossip.py" 4 | 5 | COPY src /app 6 | COPY requirements.txt /app 7 | 8 | WORKDIR /app 9 | 10 | RUN pip install -r requirements.txt 11 | 12 | EXPOSE 5000 13 | 14 | CMD [ "flask", "run", "--host=0.0.0.0"] 15 | -------------------------------------------------------------------------------- /python-flask-gossip/v1/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask 2 | flask-cors -------------------------------------------------------------------------------- /python-flask-gossip/v2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubi8/python-36 2 | 3 | ENV FLASK_APP="gossip.py" 4 | 5 | COPY src /app 6 | COPY requirements.txt /app 7 | 8 | WORKDIR /app 9 | 10 | RUN pip install -r requirements.txt 11 | 12 | EXPOSE 5000 13 | 14 | CMD [ "flask", "run", "--host=0.0.0.0"] 15 | -------------------------------------------------------------------------------- /python-flask-gossip/v2/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask 2 | flask-cors -------------------------------------------------------------------------------- /quarkus-calculator/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/*!target/lib/* -------------------------------------------------------------------------------- /quarkus-calculator/.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse 2 | .project 3 | .classpath 4 | .settings/ 5 | bin/ 6 | 7 | # IntelliJ 8 | .idea 9 | *.ipr 10 | *.iml 11 | *.iws 12 | 13 | # NetBeans 14 | nb-configuration.xml 15 | 16 | # Visual Studio Code 17 | .vscode 18 | 19 | # OSX 20 | .DS_Store 21 | 22 | # Vim 23 | *.swp 24 | *.swo 25 | 26 | # patch 27 | *.orig 28 | *.rej 29 | 30 | # Maven 31 | target/ 32 | pom.xml.tag 33 | pom.xml.releaseBackup 34 | pom.xml.versionsBackup 35 | release.properties -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-adder/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-adder/.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse 2 | .project 3 | .classpath 4 | .settings/ 5 | bin/ 6 | 7 | # IntelliJ 8 | .idea 9 | *.ipr 10 | *.iml 11 | *.iws 12 | 13 | # NetBeans 14 | nb-configuration.xml 15 | 16 | # Visual Studio Code 17 | .vscode 18 | 19 | # OSX 20 | .DS_Store 21 | 22 | # Vim 23 | *.swp 24 | *.swo 25 | 26 | # patch 27 | *.orig 28 | *.rej 29 | 30 | # Maven 31 | target/ 32 | pom.xml.tag 33 | pom.xml.releaseBackup 34 | pom.xml.versionsBackup 35 | release.properties -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-adder/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/quarkus-calculator/quarkus-adder/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-adder/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-adder/Dockerfile.distroless.native: -------------------------------------------------------------------------------- 1 | FROM cescoffier/native-base:latest 2 | COPY target/*-runner /application 3 | EXPOSE 8080 4 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] 5 | 6 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-adder/src/main/java/com/redhat/training/DataHealthCheck.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training; 2 | 3 | import org.eclipse.microprofile.health.*; 4 | 5 | import javax.enterprise.context.ApplicationScoped; 6 | 7 | @Liveness 8 | @Readiness 9 | @ApplicationScoped 10 | public class DataHealthCheck implements HealthCheck { 11 | 12 | @Override 13 | public HealthCheckResponse call() { 14 | return HealthCheckResponse.named("Adder Service") 15 | .up() 16 | //.withData("foo", "fooValue") 17 | .build(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-adder/src/main/java/com/redhat/training/service/AdderService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.service; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | import javax.ws.rs.PathParam; 6 | import javax.ws.rs.Produces; 7 | import javax.ws.rs.core.MediaType; 8 | 9 | @Path("/add") 10 | public interface AdderService { 11 | 12 | @GET 13 | @Path("/{lhs}/{rhs}") 14 | @Produces(MediaType.TEXT_PLAIN) 15 | String add(@PathParam("lhs") String lhs, @PathParam("rhs") String rhs); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-adder/src/main/java/com/redhat/training/service/SolverService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.service; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | import javax.ws.rs.PathParam; 6 | import javax.ws.rs.Produces; 7 | import javax.ws.rs.core.MediaType; 8 | 9 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 10 | 11 | @RegisterRestClient 12 | @Path("/solver") 13 | public interface SolverService { 14 | @GET 15 | @Path("{equation}") 16 | @Produces(MediaType.TEXT_PLAIN) 17 | String solve(@PathParam("equation") String equation); 18 | } 19 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-adder/src/test/java/com/redhat/training/AdderResourceTest.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training; 2 | 3 | import io.quarkus.test.junit.QuarkusTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static io.restassured.RestAssured.given; 7 | import static org.hamcrest.CoreMatchers.is; 8 | 9 | @QuarkusTest 10 | public class AdderResourceTest { 11 | 12 | @Test 13 | public void testAdderEndpoint() { 14 | given() 15 | .when().get("/add/4/7") 16 | .then() 17 | .statusCode(200) 18 | .body(is("11.0")); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-multiplier/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-multiplier/.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse 2 | .project 3 | .classpath 4 | .settings/ 5 | bin/ 6 | 7 | # IntelliJ 8 | .idea 9 | *.ipr 10 | *.iml 11 | *.iws 12 | 13 | # NetBeans 14 | nb-configuration.xml 15 | 16 | # Visual Studio Code 17 | .vscode 18 | 19 | # OSX 20 | .DS_Store 21 | 22 | # Vim 23 | *.swp 24 | *.swo 25 | 26 | # patch 27 | *.orig 28 | *.rej 29 | 30 | # Maven 31 | target/ 32 | pom.xml.tag 33 | pom.xml.releaseBackup 34 | pom.xml.versionsBackup 35 | release.properties -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-multiplier/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/quarkus-calculator/quarkus-multiplier/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-multiplier/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-multiplier/Dockerfile.distroless.native: -------------------------------------------------------------------------------- 1 | FROM cescoffier/native-base:latest 2 | COPY target/*-runner /application 3 | EXPOSE 8080 4 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] 5 | 6 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-multiplier/src/main/java/com/redhat/training/DataHealthCheck.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training; 2 | 3 | import org.eclipse.microprofile.health.*; 4 | 5 | import javax.enterprise.context.ApplicationScoped; 6 | 7 | @Liveness 8 | @Readiness 9 | @ApplicationScoped 10 | public class DataHealthCheck implements HealthCheck { 11 | 12 | @Override 13 | public HealthCheckResponse call() { 14 | return HealthCheckResponse.named("Multiplier Service") 15 | .up() 16 | //.withData("foo", "fooValue") 17 | .build(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-multiplier/src/main/java/com/redhat/training/service/MultiplierService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.service; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | import javax.ws.rs.PathParam; 6 | import javax.ws.rs.Produces; 7 | import javax.ws.rs.core.MediaType; 8 | 9 | @Path("/multiply") 10 | public interface MultiplierService { 11 | 12 | @GET 13 | @Path("/{lhs}/{rhs}") 14 | @Produces(MediaType.TEXT_PLAIN) 15 | String multiply(@PathParam("lhs") String lhs, @PathParam("rhs") String rhs); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-multiplier/src/main/java/com/redhat/training/service/SolverService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.service; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | import javax.ws.rs.PathParam; 6 | import javax.ws.rs.Produces; 7 | import javax.ws.rs.core.MediaType; 8 | 9 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 10 | 11 | @RegisterRestClient 12 | @Path("/solver") 13 | public interface SolverService { 14 | @GET 15 | @Path("{equation}") 16 | @Produces(MediaType.TEXT_PLAIN) 17 | String solve(@PathParam("equation") String equation); 18 | } 19 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-multiplier/src/test/java/com/redhat/training/MultiplierResourceTest.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training; 2 | 3 | import io.quarkus.test.junit.QuarkusTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static io.restassured.RestAssured.given; 7 | import static org.hamcrest.CoreMatchers.is; 8 | 9 | @QuarkusTest 10 | public class MultiplierResourceTest { 11 | 12 | @Test 13 | public void testMultiplyEndpoint() { 14 | given() 15 | .when().get("/multiply/8/2") 16 | .then() 17 | .statusCode(200) 18 | .body(is("16.0")); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-solver/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-solver/.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse 2 | .project 3 | .classpath 4 | .settings/ 5 | bin/ 6 | 7 | # IntelliJ 8 | .idea 9 | *.ipr 10 | *.iml 11 | *.iws 12 | 13 | # NetBeans 14 | nb-configuration.xml 15 | 16 | # Visual Studio Code 17 | .vscode 18 | 19 | # OSX 20 | .DS_Store 21 | 22 | # Vim 23 | *.swp 24 | *.swo 25 | 26 | # patch 27 | *.orig 28 | *.rej 29 | 30 | # Maven 31 | target/ 32 | pom.xml.tag 33 | pom.xml.releaseBackup 34 | pom.xml.versionsBackup 35 | release.properties -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-solver/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatTraining/DO328-apps/8d7e5cd37e66dce61354cb764fc5c27bbc81ddc3/quarkus-calculator/quarkus-solver/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-solver/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-solver/Dockerfile.distroless.native: -------------------------------------------------------------------------------- 1 | FROM cescoffier/native-base:latest 2 | COPY target/*-runner /application 3 | EXPOSE 8080 4 | CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] 5 | 6 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-solver/src/main/java/com/redhat/training/DataHealthCheck.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training; 2 | 3 | import org.eclipse.microprofile.health.*; 4 | 5 | import javax.enterprise.context.ApplicationScoped; 6 | 7 | @Liveness 8 | @Readiness 9 | @ApplicationScoped 10 | public class DataHealthCheck implements HealthCheck { 11 | 12 | @Override 13 | public HealthCheckResponse call() { 14 | return HealthCheckResponse.named("Solver Service") 15 | .up() 16 | //.withData("foo", "fooValue") 17 | .build(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-solver/src/main/java/com/redhat/training/service/AdderService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.service; 2 | 3 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.PathParam; 8 | import javax.ws.rs.Produces; 9 | import javax.ws.rs.core.MediaType; 10 | 11 | @Path("/add") 12 | @RegisterRestClient 13 | public interface AdderService { 14 | 15 | @GET 16 | @Path("/{lhs}/{rhs}") 17 | @Produces(MediaType.TEXT_PLAIN) 18 | String add(@PathParam("lhs") String lhs, @PathParam("rhs") String rhs); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-solver/src/main/java/com/redhat/training/service/MultiplierService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.service; 2 | 3 | import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.PathParam; 8 | import javax.ws.rs.Produces; 9 | import javax.ws.rs.core.MediaType; 10 | 11 | @Path("/multiply") 12 | @RegisterRestClient 13 | public interface MultiplierService { 14 | 15 | @GET 16 | @Path("/{lhs}/{rhs}") 17 | @Produces(MediaType.TEXT_PLAIN) 18 | String multiply(@PathParam("lhs") String lhs, @PathParam("rhs") String rhs); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-solver/src/main/java/com/redhat/training/service/SolverService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.service; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | import javax.ws.rs.PathParam; 6 | import javax.ws.rs.Produces; 7 | import javax.ws.rs.core.MediaType; 8 | 9 | @Path("/solver") 10 | public interface SolverService { 11 | @GET 12 | @Path("{equation}") 13 | @Produces(MediaType.TEXT_PLAIN) 14 | String solve(@PathParam("equation") String equation); 15 | } 16 | -------------------------------------------------------------------------------- /quarkus-calculator/quarkus-solver/src/test/java/com/redhat/training/SolverResourceTest.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training; 2 | 3 | import io.quarkus.test.junit.QuarkusTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static io.restassured.RestAssured.given; 7 | import static org.hamcrest.CoreMatchers.is; 8 | 9 | @QuarkusTest 10 | public class SolverResourceTest { 11 | 12 | @Test 13 | public void testSolveEndpoint() { 14 | given() 15 | .when().get("/solver/3") 16 | .then() 17 | .statusCode(200) 18 | .body(is("3.0")); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /recommendation/quarkus/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !target/*-runner 3 | !target/*-runner.jar 4 | !target/lib/* -------------------------------------------------------------------------------- /recommendation/quarkus/src/main/docker/Dockerfile.jvm: -------------------------------------------------------------------------------- 1 | FROM fabric8/java-jboss-openjdk8-jdk:1.5.4 2 | ENV JAVA_OPTIONS=-Dquarkus.http.host=0.0.0.0 3 | ENV JAEGER_SERVICE_NAME=recommendation \ 4 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces \ 5 | JAEGER_PROPAGATION=b3 \ 6 | JAEGER_SAMPLER_TYPE=const \ 7 | JAEGER_SAMPLER_PARAM=1 8 | EXPOSE 8080 8778 9779 9 | COPY target/lib/* /deployments/lib/ 10 | COPY target/*-runner.jar /deployments/app.jar 11 | ENTRYPOINT [ "/deployments/run-java.sh" ] -------------------------------------------------------------------------------- /recommendation/quarkus/src/main/docker/Dockerfile.native: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | ENV JAEGER_SERVICE_NAME=recommendation\ 3 | JAEGER_ENDPOINT=http://jaeger-collector.istio-system.svc:14268/api/traces\ 4 | JAEGER_PROPAGATION=b3\ 5 | JAEGER_SAMPLER_TYPE=const\ 6 | JAEGER_SAMPLER_PARAM=1 7 | WORKDIR /work/ 8 | COPY target/*-runner /work/recommendation 9 | RUN chmod 775 /work 10 | EXPOSE 8080 8778 9779 11 | CMD ["./recommendation", "-Dquarkus.http.host=0.0.0.0", "-Xmx8m", "-Xmn8m", "-Xms8m"] -------------------------------------------------------------------------------- /recommendation/quarkus/src/test/java/com/redhat/developer/demos/recommendation/rest/NativeRecommendationResourceIT.java: -------------------------------------------------------------------------------- 1 | package com.redhat.developer.demos.recommendation.rest; 2 | 3 | import io.quarkus.test.junit.NativeImageTest; 4 | 5 | @NativeImageTest 6 | public class NativeRecommendationResourceIT extends RecommendationResourceTest { 7 | 8 | // Execute the same tests but in native mode. 9 | } -------------------------------------------------------------------------------- /sleep/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | 3 | USER 10001 4 | 5 | CMD ["/bin/sleep", "3650d"] 6 | -------------------------------------------------------------------------------- /tracing-ge/servicea/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/nodejs-12 2 | 3 | # Install dependencies 4 | COPY package.json package-lock.json ./ 5 | RUN npm ci 6 | 7 | # Copy app 8 | COPY . ./ 9 | 10 | EXPOSE 8080 11 | 12 | # Default run command 13 | CMD [ "npm", "start" ] 14 | -------------------------------------------------------------------------------- /tracing-ge/servicea/Services/ServiceB.js: -------------------------------------------------------------------------------- 1 | const RestClient = require("./RestClient"); 2 | 3 | 4 | module.exports = class ServiceB extends RestClient { 5 | 6 | callServiceB(span) { 7 | return this.get("/", span); 8 | } 9 | 10 | } -------------------------------------------------------------------------------- /tracing-ge/servicea/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "servicea", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "author": "Red Hat Training", 10 | "license": "ASL", 11 | "dependencies": { 12 | "axios": "^0.19.2", 13 | "dotenv": "^8.2.0", 14 | "fastify": "^2.13.1", 15 | "pino": "^6.2.0" 16 | }, 17 | "devDependencies": { 18 | "pino-pretty": "^4.0.0" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tracing-ge/serviceb/src/main/java/com/redhat/training/serviceb/ServiceB.java: -------------------------------------------------------------------------------- 1 | package com.redhat.training.serviceb; 2 | 3 | import javax.enterprise.context.ApplicationScoped; 4 | import javax.ws.rs.GET; 5 | import javax.ws.rs.Path; 6 | import javax.ws.rs.Produces; 7 | import javax.ws.rs.core.MediaType; 8 | 9 | @Path("/") 10 | @ApplicationScoped 11 | public class ServiceB { 12 | 13 | String message = "Hello from ServiceB!"; 14 | 15 | @GET 16 | @Produces(MediaType.TEXT_PLAIN) 17 | public String sayHello() { 18 | return message; 19 | } 20 | } -------------------------------------------------------------------------------- /tracing-ge/serviceb/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | quarkus.http.port=8080 2 | quarkus.package.uber-jar=true 3 | quarkus.http.cors=true 4 | quarkus.http.cors.methods=GET,PUT,POST,DELETE 5 | quarkus.http.cors.headers=X-Custom 6 | quarkus.http.cors.exposed-headers=Content-Disposition 7 | 8 | # TODO: Add parameters to enable Jaeger tracing 9 | 10 | -------------------------------------------------------------------------------- /vertx-greet/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jre-alpine 2 | 3 | ENV VERTICLE_FILE vertx-greet-3.9.0-fat.jar 4 | 5 | # Set the location of the verticles 6 | ENV VERTICLE_HOME /usr/verticles 7 | 8 | EXPOSE 8080 9 | 10 | COPY target/$VERTICLE_FILE $VERTICLE_HOME/ 11 | 12 | # Launch the verticle 13 | WORKDIR $VERTICLE_HOME 14 | 15 | ENTRYPOINT ["sh", "-c"] 16 | 17 | CMD ["exec java -jar $VERTICLE_FILE"] 18 | --------------------------------------------------------------------------------