This repo has dependencies on several dtk repos:
Stub remote executor and cwe-grpc-client-server mentioned below are synonyms.
minikube start
No additional setup for minikube is required
npm install
cd ./workflow_with_node_group_components
bash init_kube_resources.sh -m apply
cd ..
Available mode (-m) parameters are:
Creates necessary namespaces, custom resource definitions and resource instances
Deletes and then applies component and action instances
Note: apply must be executed first
Deletes every resource it created starting with namespaces
Create .env file and populate it according to info provided in example.env
Setup stub remote executor by following these steps
Change the following client config properties to match the ones in stub remote executor server config properties.
To execute, follow execution section in stub remote executor repo.
Execution status can be checked by executing:
$ kubectl get actions -n test
NAME AGE
create-component-group-test1 19m
kubectl get action -n test create-component-group-test1 -o yaml -w
Assuming user pulled workflow executor repo.
git clone [email protected]:dtk/cwe-grpc-client-server.git
cd cwe-grpc-client-server
npm install
Apply stub remote executor service:
bash apply-service.sh
service/stub-remote-executor created
http://{ip}:32422
Add above address and port to controller workflow executor 'config/grpc.ts' client data
Apply controller workflow executor service, in controller workflow executor dir:
cd kube-cwe-resources
bash apply-service.sh
service/cwe created
http://{ip}:31038
Add above address and port to stub remote executor 'config/grpc.ts' client data
After editing controller workflow executor and stub remote executor config, push images to docker
- In workflow executor dir:
nano kube-cwe-resources/cwe.yaml
- Change the below image to your username
...
- name: app-container
image: {user-name}/c-w-e
imagePullPolicy: Always
ports:
- containerPort: 8083
...
cd ..
docker build -t {user-name}/c-w-e .
docker push {user-name}/c-w-e
- In stub remote executor dir:
nano stub-deployment.yaml
- Change the below image to your username
...
- name: app-container
image: {user-name}/stub-remote-executor
imagePullPolicy: Always
ports:
- containerPort: 8082
...
docker build -t {user-name}/stub-remote-executor .
docker push {user-name}/stub-remote-executor
create service account and apply deployment (in stub remote executor dir)
kubectl create serviceaccount api-service-account
kubectl apply -f stub-deployment.yaml
kubectl get pods -w
NAME READY STATUS RESTARTS AGE
stub-remote-executor-5867ccddc4-7hsxz 1/1 Running 0 31s
After pod is running, check if log output is similar to the following
$ kubectl logs -c app-container -f stub-remote-executor-5867ccddc4-7hsxz
server started: Server {
handlers:
{ '/pckg_executable_action.ActionRequest/StreamAction':
...,
_server: Server {},
started: true }
Navigate to workflow executor dir.
cd ./workflow_with_node_group_components
bash init_kube_resources.sh -m apply
cd ..
cd ./kube-cwe-resources
bash apply-cwe.sh
cd ..
If pod is running
kubectl get pods -w
NAME READY STATUS RESTARTS AGE
stub-remote-executor-5867ccddc4-7hsxz 1/1 Running 0 2m56s
cwe-5849d9cdc9-p6z9l 1/1 Running 0 28s
check if log output is similar to the following
$ kubectl logs -c app-container -f cwe-5849d9cdc9-p6z9l
server started: Server {
handlers:
{ '/pckg_executable_action.ActionRequest/StreamAction':
...,
_server: Server {},
started: true }
In stub remote executor repo do:
npm run send
while watching logs of both pods.
Check status of steps in:
kubectl get action -n test create-component-group-test1 -o yaml
Content type
Image
Digest
Size
126.2 MB
Last updated
over 6 years ago
docker pull getdtk/controller-workflow-executor