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
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: petshop-ingress | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
nginx.ingress.kubernetes.io/use-regex: "true" | |
nginx.ingress.kubernetes.io/rewrite-target: /$1 | |
spec: | |
rules: |
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
var HelloBlockchain = artifacts.require("HelloBlockchain"); | |
module.exports = function(done) { | |
console.log("Getting the deployed version of the HelloBlockchain smart contract") | |
HelloBlockchain.deployed().then(function(instance) { | |
console.log("Calling getMessage function for contract ", instance.address); | |
return instance.getMessage(); | |
}).then(function(result) { | |
console.log("Request message value: ", result); | |
console.log("Request complete"); |
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
var HelloBlockchain = artifacts.require("HelloBlockchain"); | |
module.exports = function(done) { | |
console.log("Getting the deployed version of the HelloBlockchain smart contract") | |
HelloBlockchain.deployed().then(function(instance) { | |
console.log("Calling SendRequest function for contract ", instance.address); | |
return instance.SendRequest("Hello, blockchain!"); | |
}).then(function(result) { | |
console.log("Transaction hash: ", result.tx); | |
console.log("Request complete"); |
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
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.4.22 <0.9.0; | |
contract HelloBlockchain { | |
enum StateType {Request, Respond} | |
//List of properties | |
StateType public State; | |
address public Requestor; | |
address public Responder; |
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
var HelloBlockchain = artifacts.require("HelloBlockchain"); | |
var Arg = "Hello world"; | |
module.exports = deployer => { | |
deployer.deploy(HelloBlockchain, Arg); | |
}; |
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
module.exports = { | |
networks: { | |
development: { | |
host: "127.0.0.1", | |
port: 7545, | |
network_id: "5777", | |
} | |
} | |
} |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: {{ .Release.Name }}-orders-service | |
labels: | |
app: {{ .Values.orders.label.name }} | |
spec: | |
ports: | |
- port: {{ .Values.orders.service.port }} | |
protocol: TCP |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: {{ .Release.Name }}-orders-deployment | |
labels: | |
app: {{ .Values.orders.label.name }} | |
spec: | |
replicas: {{ .Values.orders.replicas }} | |
selector: | |
matchLabels: |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: {{ .Release.Name }}-products-service | |
labels: | |
app: {{ .Values.products.label.name }} | |
spec: | |
ports: | |
- port: {{ .Values.products.service.port }} | |
protocol: TCP |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: {{ .Release.Name }}-products-deployment | |
labels: | |
app: {{ .Values.products.label.name }} | |
spec: | |
replicas: {{ .Values.products.replicas }} | |
selector: | |
matchLabels: |
NewerOlder