Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.92k stars 397 forks source link

draft connect timeout issue #776

Closed quantum-fusion closed 6 years ago

quantum-fusion commented 6 years ago

The problem is that the draft connect does not get the buildlID, and it times out.

The docker hub location is here: https://hub.docker.com/r/joethecoder2/example-python/tags/

I followed the instructions for the draft python example here: https://github.com/Azure/draft/blob/master/docs/getting-started.md

-see trace information --- draft up Draft Up Started: 'example-python': 01CE6JAGCZTP5F1FNJY1S2DFB6 example-python: Building Docker Image: SUCCESS ⚓ (98.0275s) example-python: Pushing Docker Image: SUCCESS ⚓ (12.0604s) example-python: Releasing Application: SUCCESS ⚓ (5.1345s) Inspect the logs with draft logs 01CE6JAGCZTP5F1FNJY1S2DFB6 MacBook-Pro-2:example-python hottelet$ draft logs Step 1 : FROM python:onbuild onbuild: Pulling from library/python 3d77ce4481b1: Pulling fs layer 534514c83d69: Pulling fs layer d562b1c3ac3f: Pulling fs layer 4b85e68dc01d: Pulling fs layer a60ceaabb01c: Pulling fs layer ba209b7a7239: Pulling fs layer 235ce1ab7310: Pulling fs layer bd6e9cb6b441: Pulling fs layer 3805686ca0fc: Pulling fs layer 4b85e68dc01d: Waiting a60ceaabb01c: Waiting ba209b7a7239: Waiting 235ce1ab7310: Waiting bd6e9cb6b441: Waiting 3805686ca0fc: Waiting 3d77ce4481b1: Verifying Checksum 3d77ce4481b1: Download complete d562b1c3ac3f: Verifying Checksum d562b1c3ac3f: Download complete 534514c83d69: Verifying Checksum 534514c83d69: Download complete a60ceaabb01c: Verifying Checksum a60ceaabb01c: Download complete 235ce1ab7310: Verifying Checksum 235ce1ab7310: Download complete bd6e9cb6b441: Verifying Checksum bd6e9cb6b441: Download complete 3805686ca0fc: Verifying Checksum 3805686ca0fc: Download complete ba209b7a7239: Verifying Checksum ba209b7a7239: Download complete 4b85e68dc01d: Verifying Checksum 4b85e68dc01d: Download complete 3d77ce4481b1: Pull complete 534514c83d69: Pull complete d562b1c3ac3f: Pull complete 4b85e68dc01d: Pull complete a60ceaabb01c: Pull complete ba209b7a7239: Pull complete 235ce1ab7310: Pull complete bd6e9cb6b441: Pull complete 3805686ca0fc: Pull complete Digest: sha256:89f8328936e9947b8c46682803dc621da958dec6ae05da8f9ca704a49bfb309d Status: Downloaded newer image for python:onbuild

Executing 3 build triggers...

Step 1 : COPY requirements.txt /usr/src/app/ Step 1 : RUN pip install --no-cache-dir -r requirements.txt ---> Running in 1c34c399337f Collecting flask (from -r requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/7f/e7/08578774ed4536d3242b14dacb4696386634607af824ea997202cd0edb4b/Flask-1.0.2-py2.py3-none-any.whl (91kB) Collecting Jinja2>=2.10 (from flask->-r requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl (126kB) Collecting Werkzeug>=0.14 (from flask->-r requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl (322kB) Collecting itsdangerous>=0.24 (from flask->-r requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/dc/b4/a60bcdba945c00f6d608d8975131ab3f25b22f2bcfe1dab221165194b2d4/itsdangerous-0.24.tar.gz (46kB) Collecting click>=5.1 (from flask->-r requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl (71kB) Collecting MarkupSafe>=0.23 (from Jinja2>=2.10->flask->-r requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz Installing collected packages: MarkupSafe, Jinja2, Werkzeug, itsdangerous, click, flask Running setup.py install for MarkupSafe: started Running setup.py install for MarkupSafe: finished with status 'done' Running setup.py install for itsdangerous: started Running setup.py install for itsdangerous: finished with status 'done' Successfully installed Jinja2-2.10 MarkupSafe-1.0 Werkzeug-0.14.1 click-6.7 flask-1.0.2 itsdangerous-0.24 Step 1 : COPY . /usr/src/app ---> f6aa6482f71b Step 2 : ENV PORT 8080 ---> Running in fe7cc75ef6d8 ---> c641cf9dd169 Step 3 : EXPOSE 8080 ---> Running in 9f3f9160e1e4 ---> 1d7e8c5eb07d Step 4 : ENTRYPOINT python ---> Running in 73319102a684 ---> 722e14283e70 Step 5 : CMD app.py ---> Running in 5b3035ceefe0 ---> c83e2388879d Successfully built c83e2388879d The push refers to a repository [docker.io/joethecoder2/example-python] 8985bb93de2c: Preparing 0a237f04faf0: Preparing fcaa920ce970: Preparing 55fe2eed468c: Preparing 0e4f7fa7eb06: Preparing ac0e7b8ba9e8: Preparing b57c982f5768: Preparing 7ad7ab2d3895: Preparing 23044129c2ac: Preparing 8b229ec78121: Preparing 3b65755e1220: Preparing 2c833f307fd8: Preparing ac0e7b8ba9e8: Waiting b57c982f5768: Waiting 7ad7ab2d3895: Waiting 23044129c2ac: Waiting 8b229ec78121: Waiting 3b65755e1220: Waiting 2c833f307fd8: Waiting 0e4f7fa7eb06: Mounted from library/python 55fe2eed468c: Mounted from library/python ac0e7b8ba9e8: Mounted from library/python b57c982f5768: Mounted from library/python 7ad7ab2d3895: Mounted from library/python 23044129c2ac: Mounted from library/python fcaa920ce970: Pushed 8985bb93de2c: Pushed 8b229ec78121: Mounted from library/python 3b65755e1220: Mounted from library/python 2c833f307fd8: Mounted from library/python 0a237f04faf0: Pushed 6a7098f7109aaec83c87cb9f64652f926064cc2b: digest: sha256:d30fdfb62d84b94508720e3b4f7d1105378edff52c5f71279bc8053037569ac0 size: 2839

The problem is that the draft connect does not get the buidlID, and it times out:

draft connect Error: cannot get pod with buildID 01CE6JAGCZTP5F1FNJY1S2DFB6: timed out

MacBook-Pro-2:example-python hottelet$ draft history BUILD_ID CONTEXT_ID CREATED_AT RELEASE
01CE6JAGCZTP5F1FNJY1S2DFB6 CB081FC832 Wed May 23 09:18:54 2018 example-python 01CE6J668MJ1RWJBAAEFC29GWG CB081FC832 Wed May 23 09:15:22 2018 -
01CE6J007RPYMAW90D60GRG7Q8 CB081FC832 Wed May 23 09:12:00 2018 -

quantum-fusion commented 6 years ago

Yes, this transcript is showing a failure with a timed out on draft connect, and this is still open.

See #437 comments as well.

radu-matei commented 6 years ago

The main reasons draft connect times out:

You said you are trying the example-python project?

quantum-fusion commented 6 years ago

Yes, this is the example-python project example that was executed.

quantum-fusion commented 6 years ago

NAME REVISION UPDATED STATUS CHART NAMESPACE example-java 3 Sat May 19 09:38:59 2018 DEPLOYED java-v0.1.0 default
example-python 1 Wed May 23 09:23:10 2018 DEPLOYED python-v0.1.0 default
lopsided-donkey 1 Wed May 2 13:08:09 2018 DEPLOYED minecraft-0.2.1 default
my-release 1 Wed May 2 13:08:45 2018 DEPLOYED minecraft-0.2.1 default

quantum-fusion commented 6 years ago

kubectl -n kube-system get pod NAME READY STATUS RESTARTS AGE kube-addon-manager-minikube 1/1 Running 11 287d kube-dns-910330662-q1dc9 3/3 Running 34 287d kubernetes-dashboard-9tc2j 1/1 Running 12 287d registry-7fm7z 1/1 Running 0 32m tiller-deploy-420032274-ssdn0 1/1 Running 0

quantum-fusion commented 6 years ago
minikube service list ------------- --------------------------- --------------------------- NAMESPACE NAME URL
default example-java-java No node port
default example-python-python No node port
default example-service http://192.168.64.3:31052
default kubernetes No node port
default lopsided-donkey-minecraft http://192.168.64.3:30763
default my-release-minecraft http://192.168.64.3:31461
kube-system kube-dns No node port
kube-system kubernetes-dashboard http://192.168.64.3:30000
kube-system registry No node port
kube-system tiller-deploy No node port
------------- --------------------------- ---------------------------
quantum-fusion commented 6 years ago

draft history BUILD_ID CONTEXT_ID CREATED_AT RELEASE
01CE6JAGCZTP5F1FNJY1S2DFB6 CB081FC832 Wed May 23 09:18:54 2018 example-python 01CE6J668MJ1RWJBAAEFC29GWG CB081FC832 Wed May 23 09:15:22 2018 -
01CE6J007RPYMAW90D60GRG7Q8 CB081FC832 Wed May 23 09:12:00 2018 -

quantum-fusion commented 6 years ago

Is there a way to change the POD for example-python 01CE6JAGCZTP5F1FNJY1S2DFB6, from DEPLOYED to READY state?

quantum-fusion commented 6 years ago

helm ls NAME REVISION UPDATED STATUS CHART NAMESPACE example-java 3 Sat May 19 09:38:59 2018 DEPLOYED java-v0.1.0 default
example-python 1 Wed May 23 09:23:10 2018 DEPLOYED python-v0.1.0 default
lopsided-donkey 1 Wed May 2 13:08:09 2018 DEPLOYED minecraft-0.2.1 default
my-release 1 Wed May 2 13:08:45 2018 DEPLOYED minecraft-0.2.1 default

radu-matei commented 6 years ago

Could you execute a kubectl get pods in the default namespace? Thanks!

quantum-fusion commented 6 years ago

Helm shows this is in a Deployed state. Can you tell me the command to change to a READY state?

example-python 1 Wed May 23 09:23:10 2018 DEPLOYED python-v0.1.0 default

quantum-fusion commented 6 years ago

kubectl get pods NAME READY STATUS RESTARTS AGE cassandra-0 1/1 Running 4 161d cassandra-1 0/1 Pending 0 161d example-java-java-3821510223-tq8mt 1/1 Running 1 4d example-python-python-2616207425-f2hvq 0/1 Pending 0 4h my-release-minecraft-1980511755-2sbjx 0/1 ImagePullBackOff 89 21d spring-boot-web-4126579859-4tk2s 1/1 Running 4 160d spring-boot-web-4126579859-94xbs 1/1 Running 3 160d

quantum-fusion commented 6 years ago

It looks like it is stuck in a Pending status.

radu-matei commented 6 years ago

See, your example-python-python-2616207425-f2hvq pod is in pending state.

Could you execute a kubectl describe pod example-python-python-2616207425-f2hvq?

(If it's minikube, and you have some services already running, I suspect a lack of resources on your machine)

quantum-fusion commented 6 years ago

kubectl describe pod example-python-python-2616207425-f2hvq Name: example-python-python-2616207425-f2hvq Namespace: default Node: / Labels: app=example-python-python draft=example-python pod-template-hash=2616207425 Annotations: buildID=01CE6JAGCZTP5F1FNJY1S2DFB6 kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"default","name":"example-python-python-2616207425","uid":"7174994f-5e8c-11e8-8cc0... Status: Pending IP:
Controllers: ReplicaSet/example-python-python-2616207425 Containers: python: Image: docker.io/joethecoder2/example-python:6a7098f7109aaec83c87cb9f64652f926064cc2b Port: 8080/TCP Limits: cpu: 100m memory: 128Mi Requests: cpu: 100m memory: 128Mi Environment: Mounts: /var/run/secrets/kubernetes.io/serviceaccount from default-token-wgdn6 (ro) Conditions: Type Status PodScheduled False Volumes: default-token-wgdn6: Type: Secret (a volume populated by a Secret) SecretName: default-token-wgdn6 Optional: false QoS Class: Guaranteed Node-Selectors: Tolerations: Events: FirstSeen LastSeen Count From SubObjectPath Type Reason Message


4h 854 default-scheduler Warning FailedScheduling No nodes are available that match all of the following predicates:: Insufficient memory (1).

radu-matei commented 6 years ago

Yeah, as I expected: FailedScheduling No nodes are available that match all of the following predicates:: Insufficient memory (1).

Try removing some of the deployments (if that's an option) and try again.

quantum-fusion commented 6 years ago

delete pods --all pod "cassandra-0" deleted pod "cassandra-1" deleted pod "example-java-java-3821510223-tq8mt" deleted pod "example-python-python-2616207425-f2hvq" deleted pod "my-release-minecraft-1980511755-2sbjx" deleted pod "spring-boot-web-4126579859-4tk2s" deleted pod "spring-boot-web-4126579859-94xbs" deleted pod "spring-boot-web-demo" deleted

radu-matei commented 6 years ago

Please note that if your pods were part of a deployment object, then just deleting the pods will result in the scheduler trying to meet the desired state of the respective deployment, meaning you will get the pods back - what you want to do is delete the deployment itself - more info here https://kubernetes.io/docs/concepts/workloads/controllers/deployment/

quantum-fusion commented 6 years ago

kubectl get pods NAME READY STATUS RESTARTS AGE cassandra-0 1/1 Running 0 7m cassandra-1 0/1 Pending 0 5m example-java-java-3821510223-7z284 1/1 Running 0 7m example-python-python-2616207425-6s7bq 1/1 Terminating 0 7m example-python-python-3748734271-lmjcd 1/1 Running 0 my-release-minecraft-1980511755-z5kt2 0/1 Pending 0 7m spring-boot-web-4126579859-jmphs 1/1 Running 0 7m spring-boot-web-4126579859-pph77 1/1 Running 0 7m Henrys-MacBook-Pro-2:example-python hottelet$ kubectl describe pod example-python-python-3748734271-lmjcd Name: example-python-python-3748734271-lmjcd Namespace: default Node: minikube/192.168.64.3 Start Time: Wed, 23 May 2018 13:45:37 -0400 Labels: app=example-python-python draft=example-python pod-template-hash=3748734271 Annotations: buildID=01CE71DXF3FQ23X170KKRRP7EK kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"default","name":"example-python-python-3748734271","uid":"19a45548-5eb1-11e8-8cc0... Status: Running IP: 172.17.0.6 Controllers: ReplicaSet/example-python-python-3748734271 Containers: python: Container ID: docker://add4cca27b4ad47811383c296e2e15652b08f250ceb9af5d1cb0f1c5f929be52 Image: docker.io/joethecoder2/example-python:6a7098f7109aaec83c87cb9f64652f926064cc2b Image ID: docker-pullable://joethecoder2/example-python@sha256:d30fdfb62d84b94508720e3b4f7d1105378edff52c5f71279bc8053037569ac0 Port: 8080/TCP State: Running Started: Wed, 23 May 2018 13:45:38 -0400 Ready: True Restart Count: 0 Limits: cpu: 100m memory: 128Mi Requests: cpu: 100m memory: 128Mi Environment: Mounts: /var/run/secrets/kubernetes.io/serviceaccount from default-token-wgdn6 (ro) Conditions: Type Status Initialized True Ready True PodScheduled True Volumes: default-token-wgdn6: Type: Secret (a volume populated by a Secret) SecretName: default-token-wgdn6 Optional: false QoS Class: Guaranteed Node-Selectors: Tolerations: Events: FirstSeen LastSeen Count From SubObjectPath Type Reason Message


1 default-scheduler Normal Scheduled Successfully assigned example-python-python-3748734271-lmjcd to minikube 1 kubelet, minikube Normal SuccessfulMountVolume MountVolume.SetUp succeeded for volume "default-token-wgdn6" 1 kubelet, minikube spec.containers{python} Normal Pulled Container image "docker.io/joethecoder2/example-python:6a7098f7109aaec83c87cb9f64652f926064cc2b" already present on machine 1 kubelet, minikube spec.containers{python} Normal Created Created container 1 kubelet, minikube spec.containers{python} Normal Started Started container Henrys-MacBook-Pro-2:example-python hottelet$ draft connect Connect to python:8080 on localhost:56953 [python]: * Environment: production [python]: WARNING: Do not use the development server in a production environment. [python]: Use a production WSGI server instead. [python]: * Debug mode: off [python]: * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)
quantum-fusion commented 6 years ago

draft connect Connect to python:8080 on localhost:56953 [python]: Environment: production [python]: WARNING: Do not use the development server in a production environment. [python]: Use a production WSGI server instead. [python]: Debug mode: off [python]: * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit) [python]: 127.0.0.1 - - [23/May/2018 17:52:26] "GET / HTTP/1.1" 200 - [python]: 127.0.0.1 - - [23/May/2018 17:52:26] "GET /apple-touch-icon-precomposed.png HTTP/1.1" 404 - [python]: 127.0.0.1 - - [23/May/2018 17:52:26] "GET /favicon.ico HTTP/1.1" 404 - [python]: 127.0.0.1 - - [23/May/2018 17:52:26] "GET /apple-touch-icon.png HTTP/1.1" 404 -

quantum-fusion commented 6 years ago

success. Thank you.

radu-matei commented 6 years ago

Glad to hear! Will close this issue, but feel free to re-open it if you have any more questions.

quantum-fusion commented 6 years ago

I had one side question, about helm, and wanted to know, can I pass command line arguments, like I pass JAVA arguments from the command line?

quantum-fusion commented 6 years ago

Thanks again, for helping with this issue, resolution.

radu-matei commented 6 years ago

If you're talking about passing command line arguments to the application you're starting in your container, you can either add them directly in your Dockerfile, as your entrypoint, or you can pass them in your Helm template for your deployment - more info here https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/

quantum-fusion commented 6 years ago

I have an entire SpringBoot service, that will deploy in a POD, however the problem is that I can not get the arguments to pass through to the application.

https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra/blob/master/Kubernetes/singlePod.yaml


apiVersion: v1 kind: Pod metadata: name: spring-boot-web-demo labels: purpose: demonstrate-spring-boot-web spec: containers:

quantum-fusion commented 6 years ago

Google claims that their PODS are immutable, and can not be configured.

quantum-fusion commented 6 years ago

Two questions about DRAFT:

The base project is here: https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra

Can we download this project using GIT and then do these two things? If so, is there command line example for 1.) and 2.) ?

1.) Does draft compile the service to make a chart using draft create and draft up, will it automatically build the service using singlePod.yaml? If so, how?

2.) I am trying to figure out what the helm command is, to install this package, and also to set the values for cassandra_ip, cassandra_port, login, and password , is this possible from command line?

quantum-fusion commented 6 years ago

See build steps below, and draft up image build failure.

1.) git clone https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra

2.) draft create --> Draft detected HTML (31.580024%) --> Could not find a pack for HTML. Trying to find the next likely language match... --> Draft detected Slash (18.136481%) --> Could not find a pack for Slash. Trying to find the next likely language match... --> Draft detected Text (17.069171%) --> Could not find a pack for Text. Trying to find the next likely language match... --> Draft detected Python (8.511117%) --> Ready to sail

3.) draft up Draft Up Started: 'springboot_swagger_example-master-cassandra': 01CE74HAG377KMX53S5V4793W6 springboot_swagger_example-master-cassandra: Building Docker Image: FAIL ❌ (4.0006s) Inspect the logs with draft logs 01CE74HAG377KMX53S5V4793W6

Problem: The Docker Image build failed.

Outstanding questions: 1.) Does draft compile the service to make a chart using draft create and draft up, will it automatically build the service using singlePod.yaml? If so, how?

2.) I am trying to figure out what the helm command is, to install this package, and also to set the values for cassandra_ip, cassandra_port, login, and password , is this possible from command line?

quantum-fusion commented 6 years ago

These are the failure messages: draft logs 01CE74HAG377KMX53S5V4793W6 Step 1/6 : FROM java:8 ---> d23bdf5b1b1b Step 2/6 : MAINTAINER info@technologyventureslimited.com ---> Using cache ---> d23490ec5233 Step 3/6 : EXPOSE 8080 9042 ---> Using cache ---> eba04ddf9385 Step 4/6 : ADD ./spring-boot-web-0.0.1-SNAPSHOT.jar . 2018/05/23 14:35:26 error while building: ADD failed: stat /var/lib/docker/tmp/docker-builder051839526/spring-boot-web-0.0.1-SNAPSHOT.jar: no such file or directory 2018/05/23 14:35:26 complete: failed to store build object for app "springboot_swagger_example-master-cassandra": ConfigMap "springboot_swagger_example-master-cassandra" is invalid: metadata.name: Invalid value: "springboot_swagger_example-master-cassandra": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')

quantum-fusion commented 6 years ago

git clone https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra

I deleted the Dockerfile definition that I already have, and wanted to see what draft create would do.

cd springboot_swagger_example-master-cassandra

draft create --> Draft detected HTML (31.579704%) --> Could not find a pack for HTML. Trying to find the next likely language match... --> Draft detected Slash (18.136297%) --> Could not find a pack for Slash. Trying to find the next likely language match... --> Draft detected Text (17.068998%) --> Could not find a pack for Text. Trying to find the next likely language match... --> Draft detected Python (8.511031%) --> Ready to sail


draft logs 01CE74X1VM4HTA4GRY669QMHD5 Step 1/5 : FROM python:onbuild onbuild: Pulling from library/python 3d77ce4481b1: Pulling fs layer 534514c83d69: Pulling fs layer d562b1c3ac3f: Pulling fs layer 4b85e68dc01d: Pulling fs layer a60ceaabb01c: Pulling fs layer ba209b7a7239: Pulling fs layer 235ce1ab7310: Pulling fs layer bd6e9cb6b441: Pulling fs layer 3805686ca0fc: Pulling fs layer 4b85e68dc01d: Waiting a60ceaabb01c: Waiting ba209b7a7239: Waiting bd6e9cb6b441: Waiting 235ce1ab7310: Waiting 3805686ca0fc: Waiting 534514c83d69: Verifying Checksum 534514c83d69: Download complete d562b1c3ac3f: Verifying Checksum d562b1c3ac3f: Download complete 3d77ce4481b1: Verifying Checksum 3d77ce4481b1: Download complete a60ceaabb01c: Verifying Checksum a60ceaabb01c: Download complete 235ce1ab7310: Verifying Checksum 235ce1ab7310: Download complete bd6e9cb6b441: Verifying Checksum bd6e9cb6b441: Download complete 3805686ca0fc: Verifying Checksum 3805686ca0fc: Download complete ba209b7a7239: Verifying Checksum ba209b7a7239: Download complete 3d77ce4481b1: Pull complete 534514c83d69: Pull complete 4b85e68dc01d: Verifying Checksum 4b85e68dc01d: Download complete d562b1c3ac3f: Pull complete 4b85e68dc01d: Pull complete a60ceaabb01c: Pull complete ba209b7a7239: Pull complete 235ce1ab7310: Pull complete bd6e9cb6b441: Pull complete 3805686ca0fc: Pull complete Digest: sha256:89f8328936e9947b8c46682803dc621da958dec6ae05da8f9ca704a49bfb309d Status: Downloaded newer image for python:onbuild

Executing 3 build triggers

2018/05/23 14:42:15 error while building: COPY failed: stat /var/lib/docker/tmp/docker-builder681976653/requirements.txt: no such file or directory 2018/05/23 14:42:15 complete: failed to store build object for app "springboot_swagger_example-master-cassandra": ConfigMap "springboot_swagger_example-master-cassandra" is invalid: metadata.name: Invalid value: "springboot_swagger_example-master-cassandra": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')


Looking at the results from draft create, and then followed by draft up.

See errors, that I labeled 1 , 2, 3, and 4. These errors are suspect.: 1.) Status: Downloaded newer image for python:onbuild

2.) # Executing 3 build triggers 2018/05/23 14:42:15 error while building: COPY failed: stat /var/lib/docker/tmp/docker-builder681976653/requirements.txt: no such file or directory

3.) 2018/05/23 14:42:15 complete: failed to store build object for app "springboot_swagger_example-master-cassandra": ConfigMap "springboot_swagger_example-master-cassandra" is invalid:

4.) metadata.name: Invalid value: "springboot_swagger_example-master-cassandra": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')

quantum-fusion commented 6 years ago

Outstanding questions/problems/known issues/limitations:

1.) The problem is that the Dockerfile automatically generated doesn't know about the service, and I have one that is part of the project.
https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra/blob/master/dockerbuild/Dockerfile

The problem, is that DRAFT appears to expect that the JAR file already be compiled by maven as a pre-dependency. Is this true?

Does draft compile the service to make a chart using draft create and draft up, will it automatically build the service using singlePod.yaml? If so, how?

2.) Problem is that Google states that configurability for Pods doesn't work, because Pod arguments are immutable, and templating is not allowed: I am trying to figure out what the helm command is, to install this package, and also to set the values for cassandra_ip, cassandra_port, login, and password , is this possible from command line?

quantum-fusion commented 6 years ago

This is as far as I got, for a complex case springboot project example.

I will try to remedy as follows:

quantum-fusion commented 6 years ago

An error fell out, that is a draft bug: The error is that draft create thought this was a python project, which is a bug.

FROM python:onbuild ENV PORT 8080 EXPOSE 8080 ENTRYPOINT ["python"] CMD ["app.py"]

quantum-fusion commented 6 years ago

The actual Dockerfile should be as follows: FROM java:8 MAINTAINER info@technologyventureslimited.com EXPOSE 8080 9042 ADD ./spring-boot-web-0.0.1-SNAPSHOT.jar . ENTRYPOINT ["java", "-jar", "spring-boot-web-0.0.1-SNAPSHOT.jar"] CMD java -jar spring-boot-web-0.0.1-SNAPSHOT.jar $@

quantum-fusion commented 6 years ago

draft up expects that the spring-boot-web-0.0.1-SNAPSHOT.jar exist in the project, and therefore a mvn clean install has to be executed in order to create the JAR dependency.

quantum-fusion commented 6 years ago

These are the steps that I am using to test DRAFT.

  1. %git clone https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra

  2. %mvn clean install -DskipTests

  3. %draft create

  4. %draft up

Results Fail: draft up Draft Up Started: 'springboot_swagger_example-master-cassandra': 01CE78545ZSNAVCWTZGSYX69RJ springboot_swagger_example-master-cassandra: Building Docker Image: FAIL ❌ (7.0014s) Inspect the logs with draft logs 01CE78545ZSNAVCWTZGSYX69RJ

Trace results: draft logs 01CE78545ZSNAVCWTZGSYX69RJ 2018/05/23 15:38:53 error while building: Error response from daemon: Cannot locate specified Dockerfile: Dockerfile 2018/05/23 15:38:53 complete: failed to store build object for app "springboot_swagger_example-master-cassandra": ConfigMap "springboot_swagger_example-master-cassandra" is invalid: metadata.name: Invalid value: "springboot_swagger_example-master-cassandra": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')

Question: I added a symbolic link for the Dockerfile.lrwxr-xr-x 1 me staff 24 May 23 15:36 Dockerfile -> ./dockerbuild/Dockerfile

Errata question: Is there something wrong with DRAFT that doesn't either see the symbolic link, or some other reason that DRAFT isn't seeing the Dockerfile when I use the draft up command?

quantum-fusion commented 6 years ago

@radu-matei @radu-matei , Errata question: Is there something wrong with DRAFT that doesn't either see the symbolic link, or some other reason that DRAFT isn't seeing the Dockerfile when I use the draft up command?

quantum-fusion commented 6 years ago

These are the steps that I am using to test DRAFT.

%git clone https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra

%mvn clean install -DskipTests

%draft create

%draft up