From a7701fd6b2ddf6ac10de3343c8422ffd815adb83 Mon Sep 17 00:00:00 2001 From: kewegner Date: Wed, 31 Jul 2019 14:30:12 -0500 Subject: [PATCH 1/7] temporary key change --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d91ef1a..4396d28 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ deploy: provider: releases skip_cleanup: true api_key: - secure: e04vuQPXH0L12u0FalaQBzgkpT/hEN0EZVQ6R+506v5kLB+tP2eT3x6q7peyz9RAvp8Tst5X5ui7xyiPpG7s7N69e+0SUXkUIz7+2HxCKZq7tdEkpjIc33Wrea7/6KaBA8Ud7aKgHSIxzQKiDwEX733UNLwBjHr28MnoLV7QkQvjLRufpaLCZycM2eEzPo4BpikhHQgRtgvhesISAOC8dy4nvA1MUZbNtgQe9igffKhOnbYlcK69J6Unw66tesZMAmFZ/UGTfx5QG3WcBMS5ILf6cUdmp4JKiteXqnmu2gBY1rNiNsbJZFbSvzq7mK63Id12fniX0Vja8aWYgCSlfmkci+qdQm4Y4hOf/cuejGVTTEO6U+nvLClZEa5Yt+j8ZV+n7DdLppwCIz91eQ5+FZIgMJNzOtcWolvABP97exB37IjvAh/z5A1YyADLI26Bv71koV3BKbqoapOtMkx/hjhoKu7VD4o/equ6qmLRa1Z07w/PrEaQA77zt7SWmJOMftTpk4wMkQWVtolR+oTaZOwMcmowNymYxKCGcG1bgiW8lSJ/TvDw10I9b7xdenZToOsLH3zxMo3VaudgCdTVlPsrk8oTiEV6+JihKLzf+5ntQKllSixWefc0KMpkDhLbBZ+6pZR/C1mVAWaQEDsV4F+o6yTW70Ifyan5I3xj108= + secure: "OJgQOTMTVl/4xm2LZIldWGeuusgmACN9d0w9ZVBB6kF67A8TV4ImOFERdwn99laEvz+I+7F0imrGZ03ayZo/gXB+8+jeM1yPWeVZqFkQgIMqpS3u0qJRc4xyt23ajpfGX/0mfkxo72CnD6AnSdMZcl9DTNjJ9vwFRaNw7nTv02wDeQsaVEr834MnvAnQZX3ZK6pBVbktyDh+pntFUod/g7874ATW+rNZKq1THGc36ZG7An4p6P/AFmlUFObPGjaGzPB8TmoSvRHz9IV7yhZMaaRhneH/kNyCB1JxphfQENRWc/9mktWmkl9Qfud0KA/yfGPneJ6rzzv4SfwqsVKz0Juszz5K2FvSKOdxTicTZ6jWzNSFsZQQdm2LhesyfkVOEReErrhnbpXpduVR/tUtfrx+RdtjspqmiRTBNMSnAsZuvzRj7XWtyxHB9pXMAH2Nz3fA8LPtwxOfLg2fTe8NxFIbd3Gt0jEnIrC4pONrWQrDgtdkV2CycqyNXORqhyaQeyXJ/vVARfIs2GGTfGCx640oP838Sm+QZy2T/qLcdsz185hghjZNyD+z2ZeWL+wpihm4tTlaUu8KQ1O/s9AF08fEXoBEJ5LAB49n4HxTR4aIIE/YnKjAKcwgKtLhwukS6sKJlPFH8Hrn9Wj6dQj5exnqAdBc/WD0jhIr/IL4S+Y=" file: package/* file_glob: true on: From c4908d1a6dcd3ea69824ec98d7e0cf6e3f8e30ee Mon Sep 17 00:00:00 2001 From: kewegner Date: Wed, 31 Jul 2019 14:44:26 -0500 Subject: [PATCH 2/7] reverted key --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4396d28..bfbffc8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,8 +27,8 @@ deploy: provider: releases skip_cleanup: true api_key: - secure: "OJgQOTMTVl/4xm2LZIldWGeuusgmACN9d0w9ZVBB6kF67A8TV4ImOFERdwn99laEvz+I+7F0imrGZ03ayZo/gXB+8+jeM1yPWeVZqFkQgIMqpS3u0qJRc4xyt23ajpfGX/0mfkxo72CnD6AnSdMZcl9DTNjJ9vwFRaNw7nTv02wDeQsaVEr834MnvAnQZX3ZK6pBVbktyDh+pntFUod/g7874ATW+rNZKq1THGc36ZG7An4p6P/AFmlUFObPGjaGzPB8TmoSvRHz9IV7yhZMa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TW70Ifyan5I3xj108= + file: package/* file_glob: true on: tags: true From 6f44836649d1b789c97d0370217747bb24e77c68 Mon Sep 17 00:00:00 2001 From: kewegner Date: Thu, 7 Nov 2019 15:18:35 -0600 Subject: [PATCH 3/7] change image name and remove script file --- Dockerfile | 4 ++-- build.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3567eef..450b644 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM busybox -COPY ./setController.sh /setController.sh + COPY ./package/appsody-controller /appsody-controller -RUN chmod +x /setController.sh /appsody-controller +RUN chmod +x /appsody-controller WORKDIR / \ No newline at end of file diff --git a/build.sh b/build.sh index ec509e1..25977f9 100755 --- a/build.sh +++ b/build.sh @@ -4,4 +4,4 @@ set -e echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker build -t $DOCKER_ORG/install-controller:$TRAVIS_TAG -t $DOCKER_ORG/install-controller:latest . -docker push $DOCKER_ORG/appsody-controller \ No newline at end of file +docker push $DOCKER_ORG/install-controller \ No newline at end of file From c068bdd3549cff0dee080b4ce26944f8bfab6886 Mon Sep 17 00:00:00 2001 From: kewegner Date: Thu, 7 Nov 2019 15:51:32 -0600 Subject: [PATCH 4/7] image name changes CMD added --- Dockerfile | 3 ++- build.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 450b644..6afc958 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,5 @@ FROM busybox COPY ./package/appsody-controller /appsody-controller RUN chmod +x /appsody-controller -WORKDIR / \ No newline at end of file +WORKDIR / +CMD ["cp","/appsody-controller","/.appsody/appsody-controller"] \ No newline at end of file diff --git a/build.sh b/build.sh index 25977f9..0837199 100755 --- a/build.sh +++ b/build.sh @@ -3,5 +3,5 @@ set -e echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin -docker build -t $DOCKER_ORG/install-controller:$TRAVIS_TAG -t $DOCKER_ORG/install-controller:latest . -docker push $DOCKER_ORG/install-controller \ No newline at end of file +docker build -t $DOCKER_ORG/init-controller:$TRAVIS_TAG -t $DOCKER_ORG/init-controller:latest . +docker push $DOCKER_ORG/init-controller From 014c0a819b7a7ac8069673c9f11dc91b0518f67f Mon Sep 17 00:00:00 2001 From: kewegner Date: Tue, 10 Dec 2019 10:49:14 -0600 Subject: [PATCH 5/7] symlink issue --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 30fe966..ea60205 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,8 @@ If both are specified, APPSODY_CONTROLLER_IMAGE will be used. If the appsody stack of interest uses a script file (.sh for example) that is then edited by the `vi` editor while the script is running, the file modification time is not updated on the container file system until the script ends. What this means is that the ON_CHANGE action is not triggered when `vi` writes the file. +The vender watcher package code used by the controller uses filepath.Walk function from the path/filepath package to traverse the file system. This function does not evaluate symlinks. If the APPSODY_WATCH_DIR is a symlink or contains files and directories that are symlinks, it is possible that unexpected behavior may occur during file watching as the watcher may not be able to traverse symlinks or detect changes in the underlying file referenced by the symlink as expected. + ## Contributing We welcome all contributions to the Appsody project. Please see our [Contributing guidelines](https://github.com/appsody/docs/blob/master/CONTRIBUTING.md) From 57c054235beae5198dc2e5d71e9e8e5889be7aff Mon Sep 17 00:00:00 2001 From: kewegner Date: Wed, 11 Dec 2019 10:25:52 -0600 Subject: [PATCH 6/7] first drop --- main.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index a94462c..9f7fee5 100644 --- a/main.go +++ b/main.go @@ -180,7 +180,10 @@ func computeSigInt(tempSigInt string) bool { func setupEnvironmentVars() error { var err error - + appsodySeparator := os.Getenv("APPSODY_SEPARATOR") + if appsodySeparator == "" { + appsodySeparator = ";" + } tmpWATCHIGNOREDIR := os.Getenv("APPSODY_WATCH_IGNORE_DIR") appsodyRUNKILL = computeSigInt(os.Getenv("APPSODY_RUN_KILL")) appsodyDEBUGKILL = computeSigInt(os.Getenv("APPSODY_DEBUG_KILL")) @@ -249,7 +252,7 @@ func setupEnvironmentVars() error { // split the watch dirs using ; separator if tmpWatchDirs != "" { - appsodyWATCHDIRS = strings.Split(tmpWatchDirs, ";") + appsodyWATCHDIRS = strings.Split(tmpWatchDirs, appsodySeparator) //APPSODY_SEPARATOR for i := 0; i < len(appsodyWATCHDIRS); i++ { appsodyWATCHDIRS[i] = strings.TrimSpace(appsodyWATCHDIRS[i]) @@ -258,7 +261,7 @@ func setupEnvironmentVars() error { } if tmpWATCHIGNOREDIR != "" { - appsodyWATCHIGNOREDIR = strings.Split(tmpWATCHIGNOREDIR, ";") + appsodyWATCHIGNOREDIR = strings.Split(tmpWATCHIGNOREDIR, appsodySeparator) //APPSODY_SEPARATOR for i := 0; i < len(appsodyWATCHIGNOREDIR); i++ { appsodyWATCHIGNOREDIR[i] = strings.TrimSpace(appsodyWATCHIGNOREDIR[i]) @@ -269,7 +272,7 @@ func setupEnvironmentVars() error { // split the mount dirs using ; separator if tmpMountDirs != "" { - appsodyMOUNTS = strings.Split(tmpMountDirs, ";") + appsodyMOUNTS = strings.Split(tmpMountDirs, appsodySeparator) //APPSODY_SEPARATOR for i := 0; i < len(appsodyMOUNTS); i++ { // check if there is a : separator if strings.Contains(appsodyMOUNTS[i], ":") { From 95083533b46e398fd39c5b673a4ad97cb3d89755 Mon Sep 17 00:00:00 2001 From: kewegner Date: Wed, 11 Dec 2019 13:41:43 -0600 Subject: [PATCH 7/7] change var name --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 9f7fee5..4eb393c 100644 --- a/main.go +++ b/main.go @@ -180,7 +180,7 @@ func computeSigInt(tempSigInt string) bool { func setupEnvironmentVars() error { var err error - appsodySeparator := os.Getenv("APPSODY_SEPARATOR") + appsodySeparator := os.Getenv("APPSODY_MOUNT_SEPARATOR") if appsodySeparator == "" { appsodySeparator = ";" } @@ -252,7 +252,7 @@ func setupEnvironmentVars() error { // split the watch dirs using ; separator if tmpWatchDirs != "" { - appsodyWATCHDIRS = strings.Split(tmpWatchDirs, appsodySeparator) //APPSODY_SEPARATOR + appsodyWATCHDIRS = strings.Split(tmpWatchDirs, appsodySeparator) for i := 0; i < len(appsodyWATCHDIRS); i++ { appsodyWATCHDIRS[i] = strings.TrimSpace(appsodyWATCHDIRS[i]) @@ -261,7 +261,7 @@ func setupEnvironmentVars() error { } if tmpWATCHIGNOREDIR != "" { - appsodyWATCHIGNOREDIR = strings.Split(tmpWATCHIGNOREDIR, appsodySeparator) //APPSODY_SEPARATOR + appsodyWATCHIGNOREDIR = strings.Split(tmpWATCHIGNOREDIR, appsodySeparator) for i := 0; i < len(appsodyWATCHIGNOREDIR); i++ { appsodyWATCHIGNOREDIR[i] = strings.TrimSpace(appsodyWATCHIGNOREDIR[i]) @@ -272,7 +272,7 @@ func setupEnvironmentVars() error { // split the mount dirs using ; separator if tmpMountDirs != "" { - appsodyMOUNTS = strings.Split(tmpMountDirs, appsodySeparator) //APPSODY_SEPARATOR + appsodyMOUNTS = strings.Split(tmpMountDirs, appsodySeparator) for i := 0; i < len(appsodyMOUNTS); i++ { // check if there is a : separator if strings.Contains(appsodyMOUNTS[i], ":") {