diff --git a/devfile.yaml b/devfile.yaml index 5e26502510..f7742eecb9 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -1,25 +1,27 @@ -schemaVersion: 2.0.0 +schemaVersion: 2.2.0 metadata: name: python version: 1.0.0 + provider: Red Hat + supportUrl: https://github.com/devfile-samples/devfile-support#support-information attributes: - alpha.build-context: . - alpha.build-dockerfile: docker/Dockerfile + alpha.dockerimage-port: 8081 starterProjects: - name: python-example git: remotes: origin: https://github.com/odo-devfiles/python-ex components: - - name: buildguidance - attributes: - tool: console-import - container: - image: buildguidanceimage-placeholder - memoryLimit: 1024Mi - endpoints: - - name: http-8081 - targetPort: 8081 + - name: outerloop-build + image: + imageName: python-image:latest + dockerfile: + uri: docker/Dockerfile + buildContext: . + rootRequired: false + - name: outerloop-deploy + kubernetes: + uri: outerloop-deploy.yaml - name: py-web container: image: quay.io/eclipse/che-python-3.7:nightly @@ -50,3 +52,17 @@ commands: component: py-web group: kind: debug + - id: build-image + apply: + component: outerloop-build + - id: deployk8s + apply: + component: outerloop-deploy + - id: deploy + composite: + commands: + - build-image + - deployk8s + group: + kind: deploy + isDefault: true diff --git a/outerloop-deploy.yaml b/outerloop-deploy.yaml new file mode 100644 index 0000000000..e32700d032 --- /dev/null +++ b/outerloop-deploy.yaml @@ -0,0 +1,25 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + name: my-python +spec: + replicas: 1 + selector: + matchLabels: + app: python-app + template: + metadata: + labels: + app: python-app + spec: + containers: + - name: my-python + image: python-image:latest + ports: + - name: http + containerPort: 8081 + protocol: TCP + resources: + limits: + memory: "128Mi" + cpu: "500m"