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/"} ...@@ -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. # 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 # 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. # If not already set, set the tag you want to use for your images.
export TFS_IMAGE_TAG=${TFS_IMAGE_TAG:-"dev"} export TFS_IMAGE_TAG=${TFS_IMAGE_TAG:-"dev"}
......
...@@ -12,10 +12,29 @@ ...@@ -12,10 +12,29 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # 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 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: dltservice name: dltservice
namespace: dlt
spec: spec:
selector: selector:
matchLabels: matchLabels:
...@@ -27,62 +46,156 @@ spec: ...@@ -27,62 +46,156 @@ spec:
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
- name: connector - name: connector
image: labs.etsi.org:5050/tfs/controller/dlt-connector:latest image: labs.etsi.org:5050/tfs/controller/dlt-connector:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 8080 - containerPort: 8080
- containerPort: 9192 - containerPort: 9192
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
## for debug purposes ## for debug purposes
#- name: DLT_GATEWAY_HOST #- name: DLT_GATEWAY_HOST
# value: "mock-blockchain.tfs-bchain.svc.cluster.local" # value: "mock-blockchain.tfs-bchain.svc.cluster.local"
#- name: DLT_GATEWAY_PORT #- name: DLT_GATEWAY_PORT
# value: "50051" # value: "50051"
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:8080"] command: ["/bin/grpc_health_probe", "-addr=:8080"]
livenessProbe: livenessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:8080"] command: ["/bin/grpc_health_probe", "-addr=:8080"]
resources: resources:
requests: requests:
cpu: 50m cpu: 50m
memory: 64Mi memory: 64Mi
limits: limits:
cpu: 500m cpu: 500m
memory: 512Mi memory: 512Mi
- name: gateway - name: gateway
image: labs.etsi.org:5050/tfs/controller/dlt-gateway:latest image: labs.etsi.org:5050/tfs/controller/dlt-gateway:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 50051 - containerPort: 50051
#readinessProbe: resources:
# httpGet: requests:
# path: /health cpu: 200m
# port: 8081 memory: 512Mi
# initialDelaySeconds: 5 limits:
# timeoutSeconds: 5 cpu: 700m
#livenessProbe: memory: 1024Mi
# httpGet: volumeMounts:
# path: /health - mountPath: /test-network
# port: 8081 name: dlt-volume
# initialDelaySeconds: 5 readOnly: true
# timeoutSeconds: 5 env:
resources: - name: CHANNEL_NAME
requests: valueFrom:
cpu: 200m configMapKeyRef:
memory: 512Mi name: dlt-config
limits: key: CHANNEL_NAME
cpu: 700m - name: CHAINCODE_NAME
memory: 1024Mi 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 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: dltservice name: dltservice
namespace: dlt
labels: labels:
app: dltservice app: dltservice
spec: spec:
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/"
# Set the list of components, separated by spaces, you want to build images for, and deploy. # 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 # Uncomment to activate Monitoring
#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring"
......
...@@ -54,4 +54,4 @@ Make the necessary changes to the environment variables inside the **configmap.y ...@@ -54,4 +54,4 @@ Make the necessary changes to the environment variables inside the **configmap.y
./deploy_dlt_gateway.sh ./deploy_dlt_gateway.sh
``` ```
Once the Kubernetes service is deployed, TFS can perform gRPC requests to as usual. Once the Kubernetes service is deployed, TFS can perform gRPC requests to as usual.
\ No newline at end of file \ 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