-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/NashTech-Labs/car-demo into …
…main
- Loading branch information
Showing
29 changed files
with
1,314 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
spring: | ||
profiles: | ||
active: cosmos | ||
active: firestore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
cart-service/src/main/java/com/nashtech/car/cart/WebConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.nashtech.car.cart; | ||
|
||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.servlet.config.annotation.CorsRegistry; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
@Configuration | ||
@ComponentScan | ||
public class WebConfig implements WebMvcConfigurer { | ||
|
||
@Override | ||
public void addCorsMappings(CorsRegistry registry) { | ||
registry.addMapping("/**") | ||
.allowedOrigins("http://localhost:4200/") // Allow requests from Angular app | ||
.allowedMethods("GET", "POST", "PUT", "DELETE") | ||
.maxAge(3600); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
HELP.md | ||
target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
!**/src/main/**/target/ | ||
!**/src/test/**/target/ | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
build/ | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### VS Code ### | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: '3' | ||
services: | ||
elasticsearch: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.0 | ||
container_name: elasticsearch | ||
environment: | ||
- node.name=elasticsearch | ||
- cluster.name=mycluster | ||
- discovery.type=single-node | ||
ports: | ||
- "9200:9200" | ||
- "9300:9300" | ||
ulimits: | ||
memlock: | ||
soft: -1 | ||
hard: -1 | ||
mem_limit: 1g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: elasticsearch.k8s.elastic.co/v1 | ||
kind: Elasticsearch | ||
metadata: | ||
name: elasticsearch | ||
spec: | ||
version: 7.6.0 | ||
nodeSets: | ||
- name: default | ||
count: 1 | ||
config: | ||
node.master: true | ||
node.data: true | ||
node.ingest: true | ||
node.store.allow_mmap: false | ||
xpack.security.authc: | ||
anonymous: | ||
username: anonymous | ||
roles: superuser | ||
authz_exception: false | ||
http: | ||
tls: | ||
selfSignedCertificate: | ||
disabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: elasticsearch-es-http | ||
spec: | ||
selector: | ||
app.kubernetes.io/name: MyApp | ||
ports: | ||
- protocol: TCP | ||
port: 9200 | ||
targetPort: 9200 | ||
clusterIP: 10.0.232.81 | ||
type: LoadBalancer | ||
status: | ||
loadBalancer: | ||
ingress: | ||
- ip: 192.0.2.127 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Variables to be used | ||
resourceGroupName="az-nashtech-resource-group" | ||
resourceLocation="EastUS" | ||
clusterName="ntdemocluster" | ||
|
||
#Scripts | ||
|
||
#Login to Azure in Local | ||
az login | ||
|
||
#Create Resource Group | ||
az group create --name $resourceGroupName --location $resourceLocation | ||
|
||
#Create an AKS Cluster with default setting | ||
az aks create --resource-group $resourceGroupName --name $clusterName | ||
|
||
#Get the Kubernetes Configuration to run further commands | ||
az aks get-credentials --resource-group $resourceGroupName --name $clusterName | ||
|
||
#Run this command to install CRDS | ||
kubectl create -f https://download.elastic.co/downloads/eck/2.9.0/crds.yaml | ||
|
||
# Download the required repo for elastic | ||
kubectl apply -f https://download.elastic.co/downloads/eck/2.9.0/operator.yaml | ||
|
||
#Apply the deployment File | ||
kubectl apply -f elastic-deployment.yaml | ||
|
||
# Once Pod is up take the Cluster Ip and add it into the elastic-svc.yaml file | ||
kubectl apply -f elastic-svc.yaml | ||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.