Commit a741f76f authored by Javier Diaz's avatar Javier Diaz
Browse files

Updated the Manifest files and deployment scripts for DLT

parent 78dae728
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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"}
+159 −46
Original line number Diff line number Diff line
@@ -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:
@@ -59,18 +78,6 @@ spec:
        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
@@ -78,11 +85,117 @@ spec:
          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:
+1 −1
Original line number Diff line number Diff line
@@ -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"
+1 −1

File changed.

Contains only whitespace changes.