Skip to content
Snippets Groups Projects
Commit a741f76f authored by Javier Diaz's avatar Javier Diaz
Browse files

Updated the Manifest files and deployment scripts for DLT

parent 78dae728
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!259Resolve "(CTTC) Replace DLT Gateway functionality with an opensource and Hyper Ledger v2.4+ compliant version"
......@@ -27,7 +27,7 @@ export TFS_REGISTRY_IMAGES=${TFS_REGISTRY_IMAGES:-"http://localhost:32000/tfs/"}
# If not already set, set the list of components, separated by spaces, you want to build images for, and deploy.
# By default, only basic components are deployed
export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device ztp monitoring pathcomp service slice nbi webui load_generator"}
export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device ztp monitoring pathcomp service slice nbi webui load_generator dlt"}
# If not already set, set the tag you want to use for your images.
export TFS_IMAGE_TAG=${TFS_IMAGE_TAG:-"dev"}
......
......@@ -12,10 +12,29 @@
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v1
kind: ConfigMap
metadata:
name: dlt-config
namespace: dlt
data:
CHANNEL_NAME: "channel1"
CHAINCODE_NAME: "adrenalineDLT"
MSP_ID: "Org1MSP"
PEER_ENDPOINT: "PEER_IP:PORT"
PEER_HOST_ALIAS: "peer0.org1.adrenaline.com"
CRYPTO_PATH: "/test-network/organizations/peerOrganizations/org1.adrenaline.com"
KEY_DIRECTORY_PATH: "/test-network/organizations/peerOrganizations/org1.adrenaline.com/users/User1@org1.adrenaline.com/msp/keystore"
CERT_DIRECTORY_PATH: "/test-network/organizations/peerOrganizations/org1.adrenaline.com/users/User1@org1.adrenaline.com/msp/signcerts"
TLS_CERT_PATH: "/test-network/organizations/peerOrganizations/org1.adrenaline.com/peers/peer0.org1.adrenaline.com/tls/ca.crt"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dltservice
namespace: dlt
spec:
selector:
matchLabels:
......@@ -27,62 +46,156 @@ spec:
spec:
terminationGracePeriodSeconds: 5
containers:
- name: connector
image: labs.etsi.org:5050/tfs/controller/dlt-connector:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
- containerPort: 9192
env:
- name: LOG_LEVEL
value: "INFO"
- name: connector
image: labs.etsi.org:5050/tfs/controller/dlt-connector:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
- containerPort: 9192
env:
- name: LOG_LEVEL
value: "INFO"
## for debug purposes
#- name: DLT_GATEWAY_HOST
# value: "mock-blockchain.tfs-bchain.svc.cluster.local"
#- name: DLT_GATEWAY_PORT
# value: "50051"
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:8080"]
livenessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:8080"]
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 500m
memory: 512Mi
- name: gateway
image: labs.etsi.org:5050/tfs/controller/dlt-gateway:latest
imagePullPolicy: Always
ports:
- containerPort: 50051
#readinessProbe:
# httpGet:
# path: /health
# port: 8081
# initialDelaySeconds: 5
# timeoutSeconds: 5
#livenessProbe:
# httpGet:
# path: /health
# port: 8081
# initialDelaySeconds: 5
# timeoutSeconds: 5
resources:
requests:
cpu: 200m
memory: 512Mi
limits:
cpu: 700m
memory: 1024Mi
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:8080"]
livenessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:8080"]
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 500m
memory: 512Mi
- name: gateway
image: labs.etsi.org:5050/tfs/controller/dlt-gateway:latest
imagePullPolicy: Always
ports:
- containerPort: 50051
resources:
requests:
cpu: 200m
memory: 512Mi
limits:
cpu: 700m
memory: 1024Mi
volumeMounts:
- mountPath: /test-network
name: dlt-volume
readOnly: true
env:
- name: CHANNEL_NAME
valueFrom:
configMapKeyRef:
name: dlt-config
key: CHANNEL_NAME
- name: CHAINCODE_NAME
valueFrom:
configMapKeyRef:
name: dlt-config
key: CHAINCODE_NAME
- name: MSP_ID
valueFrom:
configMapKeyRef:
name: dlt-config
key: MSP_ID
- name: PEER_ENDPOINT
valueFrom:
configMapKeyRef:
name: dlt-config
key: PEER_ENDPOINT
- name: PEER_HOST_ALIAS
valueFrom:
configMapKeyRef:
name: dlt-config
key: PEER_HOST_ALIAS
- name: CRYPTO_PATH
valueFrom:
configMapKeyRef:
name: dlt-config
key: CRYPTO_PATH
- name: KEY_DIRECTORY_PATH
valueFrom:
configMapKeyRef:
name: dlt-config
key: KEY_DIRECTORY_PATH
- name: CERT_DIRECTORY_PATH
valueFrom:
configMapKeyRef:
name: dlt-config
key: CERT_DIRECTORY_PATH
- name: TLS_CERT_PATH
valueFrom:
configMapKeyRef:
name: dlt-config
key: TLS_CERT_PATH
volumes:
- name: dlt-volume
persistentVolumeClaim:
claimName: dlt-pvc
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: dlt-pvc
namespace: dlt
spec:
accessModes:
- ReadOnlyMany
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: dlt-pv
spec:
capacity:
storage: 1Gi
accessModes:
- ReadOnlyMany
persistentVolumeReclaimPolicy: Retain
hostPath:
path: "/home/cttc/test-network"
claimRef:
namespace: dlt
name: dlt-pvc
---
apiVersion: v1
kind: Service
metadata:
name: gatewayservice
namespace: dlt
spec:
selector:
app: dltservice
ports:
- protocol: TCP
port: 50051
targetPort: 50051
nodePort: 32001
type: NodePort
---
apiVersion: v1
kind: Service
metadata:
name: dltservice
namespace: dlt
labels:
app: dltservice
spec:
......
......@@ -20,7 +20,7 @@
export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/"
# Set the list of components, separated by spaces, you want to build images for, and deploy.
export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator"
export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator dlt"
# Uncomment to activate Monitoring
#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring"
......
......@@ -54,4 +54,4 @@ Make the necessary changes to the environment variables inside the **configmap.y
./deploy_dlt_gateway.sh
```
Once the Kubernetes service is deployed, TFS can perform gRPC requests to as usual.
\ No newline at end of file
Once the Kubernetes service is deployed, TFS can perform gRPC requests to as usual.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment