diff options
Diffstat (limited to 'recipes-demo')
-rw-r--r-- | recipes-demo/helloworld-flask/helloworld-flask_0.1.bb | 21 | ||||
-rw-r--r-- | recipes-demo/images/app-container-curl.bb | 2 | ||||
-rw-r--r-- | recipes-demo/images/app-container.bb | 2 |
3 files changed, 14 insertions, 11 deletions
diff --git a/recipes-demo/helloworld-flask/helloworld-flask_0.1.bb b/recipes-demo/helloworld-flask/helloworld-flask_0.1.bb index 896e45fd..043ccc52 100644 --- a/recipes-demo/helloworld-flask/helloworld-flask_0.1.bb +++ b/recipes-demo/helloworld-flask/helloworld-flask_0.1.bb | |||
@@ -16,23 +16,26 @@ CONTAINERIMAGE ?= "zeddii/app-container:latest" | |||
16 | CONTAINERPORT ?= "9000" | 16 | CONTAINERPORT ?= "9000" |
17 | EXTERNALPORT ?= "10000" | 17 | EXTERNALPORT ?= "10000" |
18 | 18 | ||
19 | S = "${WORKDIR}/sources" | ||
20 | UNPACKDIR = "${S}" | ||
21 | |||
19 | do_install() { | 22 | do_install() { |
20 | 23 | ||
21 | for tgt in flask-app.yaml flask-app-service.yaml; do | 24 | for tgt in flask-app.yaml flask-app-service.yaml; do |
22 | sed -i 's%\@NAME\@%${NAME}%g' ${WORKDIR}/$tgt | 25 | sed -i 's%\@NAME\@%${NAME}%g' ${UNPACKDIR}/$tgt |
23 | sed -i 's%\@APPNAME\@%${APPNAME}%g' ${WORKDIR}/$tgt | 26 | sed -i 's%\@APPNAME\@%${APPNAME}%g' ${UNPACKDIR}/$tgt |
24 | sed -i 's%\@CONTAINERNAME\@%${CONTAINERNAME}%g' ${WORKDIR}/$tgt | 27 | sed -i 's%\@CONTAINERNAME\@%${CONTAINERNAME}%g' ${UNPACKDIR}/$tgt |
25 | sed -i 's%\@CONTAINERIMAGE\@%${CONTAINERIMAGE}%g' ${WORKDIR}/$tgt | 28 | sed -i 's%\@CONTAINERIMAGE\@%${CONTAINERIMAGE}%g' ${UNPACKDIR}/$tgt |
26 | sed -i 's%\@CONTAINERPORT\@%${CONTAINERPORT}%g' ${WORKDIR}/$tgt | 29 | sed -i 's%\@CONTAINERPORT\@%${CONTAINERPORT}%g' ${UNPACKDIR}/$tgt |
27 | sed -i 's%\@EXTERNALPORT\@%${EXTERNALPORT}%g' ${WORKDIR}/$tgt | 30 | sed -i 's%\@EXTERNALPORT\@%${EXTERNALPORT}%g' ${UNPACKDIR}/$tgt |
28 | done | 31 | done |
29 | 32 | ||
30 | install -d ${D}${bindir}/ | 33 | install -d ${D}${bindir}/ |
31 | install -m 755 ${WORKDIR}/flask-app ${D}${bindir}/ | 34 | install -m 755 ${UNPACKDIR}/flask-app ${D}${bindir}/ |
32 | 35 | ||
33 | install -d ${D}${sysconfdir}/deploy | 36 | install -d ${D}${sysconfdir}/deploy |
34 | install -m 644 ${WORKDIR}/flask-app.yaml ${D}${sysconfdir}/ | 37 | install -m 644 ${UNPACKDIR}/flask-app.yaml ${D}${sysconfdir}/ |
35 | install -m 644 ${WORKDIR}/flask-app-service.yaml ${D}${sysconfdir}/ | 38 | install -m 644 ${UNPACKDIR}/flask-app-service.yaml ${D}${sysconfdir}/ |
36 | } | 39 | } |
37 | 40 | ||
38 | RDEPENDS:${PN} += "python3-core python3-flask" | 41 | RDEPENDS:${PN} += "python3-core python3-flask" |
diff --git a/recipes-demo/images/app-container-curl.bb b/recipes-demo/images/app-container-curl.bb index 51451300..ddeb3022 100644 --- a/recipes-demo/images/app-container-curl.bb +++ b/recipes-demo/images/app-container-curl.bb | |||
@@ -43,4 +43,4 @@ OCI_IMAGE_TAG = "easy" | |||
43 | OCI_IMAGE_ENTRYPOINT_ARGS = "http://localhost:80" | 43 | OCI_IMAGE_ENTRYPOINT_ARGS = "http://localhost:80" |
44 | CONTAINER_SHELL = "busybox" | 44 | CONTAINER_SHELL = "busybox" |
45 | 45 | ||
46 | IMAGE_INSTALL:append = "curl" | 46 | IMAGE_INSTALL:append = " curl" |
diff --git a/recipes-demo/images/app-container.bb b/recipes-demo/images/app-container.bb index 22d2ab9f..8188d57a 100644 --- a/recipes-demo/images/app-container.bb +++ b/recipes-demo/images/app-container.bb | |||
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384 | |||
7 | OCI_IMAGE_ENTRYPOINT = "/usr/bin/flask-app" | 7 | OCI_IMAGE_ENTRYPOINT = "/usr/bin/flask-app" |
8 | CONTAINER_SHELL = "busybox" | 8 | CONTAINER_SHELL = "busybox" |
9 | 9 | ||
10 | IMAGE_INSTALL:append = "helloworld-flask" | 10 | IMAGE_INSTALL:append = " helloworld-flask" |
11 | 11 | ||
12 | IMAGE_FSTYPES = "container oci" | 12 | IMAGE_FSTYPES = "container oci" |
13 | inherit image | 13 | inherit image |