How to version a private jelastic environment





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







2















In order to track the configuration of our Jelastic hosting environment, I would like to version it in a git repository. The repository is supposed to be private and contain several different branches with different versions (such as master, abc123, v1.1).



My first try was to create a private github repo containing:




  • A manifest.json, to describe the environment's topology

  • A set of configuration files, such as webserver configuration, …


Now, I wonder:



A) How can I import an environment from a private git(hub) repository into Jelastic? Can I use the Dashboard Import URL feature to do so? Or do I have to use the CLI?



B) How can I make sure that the manifest.json refers to the configuration file of the same version as the manifest.json itself? How do I pass the credentials for Jelastic to be able to retrieve the configuration files?



I had a look at one of the Jelastic sample environments:
https://github.com/jelastic-jps/basic-examples/blob/master/automatic-environment-migration-after-cloning/manifest.jps



There:
The configuration files (e.g. alfresco-global.properties) are loaded from a public github repository. Therefore no credentials are required, neither for the manifest.json, nor for the configuration files. Additionally, the configuration files will always be loaded from the master branch.



In contrast,




  • I would like the repository to be private

  • I would like to make sure that version abc123 of the manifest.json will always be deployed with version abc123 of the configuration files.


Is this possible at all? And is there a best-practice?










share|improve this question





























    2















    In order to track the configuration of our Jelastic hosting environment, I would like to version it in a git repository. The repository is supposed to be private and contain several different branches with different versions (such as master, abc123, v1.1).



    My first try was to create a private github repo containing:




    • A manifest.json, to describe the environment's topology

    • A set of configuration files, such as webserver configuration, …


    Now, I wonder:



    A) How can I import an environment from a private git(hub) repository into Jelastic? Can I use the Dashboard Import URL feature to do so? Or do I have to use the CLI?



    B) How can I make sure that the manifest.json refers to the configuration file of the same version as the manifest.json itself? How do I pass the credentials for Jelastic to be able to retrieve the configuration files?



    I had a look at one of the Jelastic sample environments:
    https://github.com/jelastic-jps/basic-examples/blob/master/automatic-environment-migration-after-cloning/manifest.jps



    There:
    The configuration files (e.g. alfresco-global.properties) are loaded from a public github repository. Therefore no credentials are required, neither for the manifest.json, nor for the configuration files. Additionally, the configuration files will always be loaded from the master branch.



    In contrast,




    • I would like the repository to be private

    • I would like to make sure that version abc123 of the manifest.json will always be deployed with version abc123 of the configuration files.


    Is this possible at all? And is there a best-practice?










    share|improve this question

























      2












      2








      2








      In order to track the configuration of our Jelastic hosting environment, I would like to version it in a git repository. The repository is supposed to be private and contain several different branches with different versions (such as master, abc123, v1.1).



      My first try was to create a private github repo containing:




      • A manifest.json, to describe the environment's topology

      • A set of configuration files, such as webserver configuration, …


      Now, I wonder:



      A) How can I import an environment from a private git(hub) repository into Jelastic? Can I use the Dashboard Import URL feature to do so? Or do I have to use the CLI?



      B) How can I make sure that the manifest.json refers to the configuration file of the same version as the manifest.json itself? How do I pass the credentials for Jelastic to be able to retrieve the configuration files?



      I had a look at one of the Jelastic sample environments:
      https://github.com/jelastic-jps/basic-examples/blob/master/automatic-environment-migration-after-cloning/manifest.jps



      There:
      The configuration files (e.g. alfresco-global.properties) are loaded from a public github repository. Therefore no credentials are required, neither for the manifest.json, nor for the configuration files. Additionally, the configuration files will always be loaded from the master branch.



      In contrast,




      • I would like the repository to be private

      • I would like to make sure that version abc123 of the manifest.json will always be deployed with version abc123 of the configuration files.


      Is this possible at all? And is there a best-practice?










      share|improve this question














      In order to track the configuration of our Jelastic hosting environment, I would like to version it in a git repository. The repository is supposed to be private and contain several different branches with different versions (such as master, abc123, v1.1).



      My first try was to create a private github repo containing:




      • A manifest.json, to describe the environment's topology

      • A set of configuration files, such as webserver configuration, …


      Now, I wonder:



      A) How can I import an environment from a private git(hub) repository into Jelastic? Can I use the Dashboard Import URL feature to do so? Or do I have to use the CLI?



      B) How can I make sure that the manifest.json refers to the configuration file of the same version as the manifest.json itself? How do I pass the credentials for Jelastic to be able to retrieve the configuration files?



      I had a look at one of the Jelastic sample environments:
      https://github.com/jelastic-jps/basic-examples/blob/master/automatic-environment-migration-after-cloning/manifest.jps



      There:
      The configuration files (e.g. alfresco-global.properties) are loaded from a public github repository. Therefore no credentials are required, neither for the manifest.json, nor for the configuration files. Additionally, the configuration files will always be loaded from the master branch.



      In contrast,




      • I would like the repository to be private

      • I would like to make sure that version abc123 of the manifest.json will always be deployed with version abc123 of the configuration files.


      Is this possible at all? And is there a best-practice?







      git devops jelastic






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 3 at 12:21









      SomeBdyElseSomeBdyElse

      155119




      155119
























          2 Answers
          2






          active

          oldest

          votes


















          2















          A) How can I import an environment from a private git(hub) repository
          into Jelastic? Can I use the Dashboard Import URL feature to do so? Or
          do I have to use the CLI?



          B) How can I make sure that the manifest.json refers to the
          configuration file of the same version as the manifest.json itself?
          How do I pass the credentials for Jelastic to be able to retrieve the
          configuration files?




          To import an environment from a private Github repository into Jelastic, you should import manifest file URL with token through Dashboard Import feature.



          To do this, you need:




          • generate a token on Github https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/


          • in the manifest file, a token should be used for all links to the private repository


          • Dashboard Import -> URL -> https://raw.githubusercontent.com/{user}/{repo}/{branch}/manifest.jps



          Example for manifest file:



          type: install
          name: Test Private Repo

          baseUrl: https://raw.githubusercontent.com/{user}/{repo}/{branch}
          settings:
          fields:
          - name: token
          caption: Token
          type: string
          default:

          globals:
          token: ${settings.token}

          description: README.md?access_token=${globals.token}

          onInstall:
          # Shell script by URL
          - cmd: script.sh?access_token=${globals.token}

          # Base URL inside shell script
          - cmd: |
          wget '${baseUrl}/script.sh?access_token=${globals.token}' -O script.sh
          chmod +x script.sh
          ./script.sh

          # Javascript by URL
          - script: script.js?access_token=${globals.token}





          share|improve this answer


























          • Thank you for your quick reaction. The above manifest file would solve the issue. Unfortunately, adding a personal access token to the source code of the application is not an option for me. Is there any other way that the import dialog will accept credentials (such as BasicAuth credentials) to be used for fetching the manifest.json and all subsequent files? Would a dynamic baseUrl help? Example import URL (fine in curl): https://$token:@raw.githubusercontent.com/repo/$version/manifest.json Derived baseUrl: https://$token:@raw.githubusercontent.com/repo/$version/

            – SomeBdyElse
            Jan 6 at 18:16











          • We slightly changed the example in the answer, now you can use the token without inserting it into the manifest. HTTP Basic Auth support will be available in a future release.

            – Jelastic
            Jan 9 at 10:43











          • Great, thank you! I will have a look if that works. I will also check if I can leave out the static baseURL, so the import function will automatically pick the right version for the files.

            – SomeBdyElse
            Jan 11 at 7:40





















          3














          How can I import an environment from a private git(hub) repository into Jelastic? Can I use the Dashboard Import URL feature to do so? Or do I have to use the CLI?



          For this, We need to use the webhook functionality provided by any decent GIT SCM. Check generate token link.



          sample



          Within the opened installation window, specify the following data:





          • Git Repo Url - HTTPS link to your application repo


          • Branch - a project branch to be used


          • User- your Git account login


          • Token - personal Git access token for webhook generation (can be created within GitHub/GitLab account settings)


          • Environment name - target environment your application should be deployed to


          • Nodes - application server name (is fetched automatically upon selecting the environment)


          After success installation, all the further changes, committed to a source repository, will be automatically delivered to your environment inside Jelastic Cloud.



          How can I make sure that the manifest.json refers to the configuration file of the same version as the manifest.json itself? How do I pass the credentials for Jelastic to be able to retrieve the configuration files?



          As we are using Jelastic, We just can use the Jelastic provided functionalities. Currently you can set the branch name, so you could have :




          • As many repositories as manifest.jps you have

          • As many branches as manifest.jps you have


          Is there a best-practice?



          Bet practice could be use As many repositories as manifest.jps you have and use git flow to versioning:



          git-flow



          Master as the stable and production version of manifest.jps. Any change of this manifest.jps must be audited or reviewed by a team in order to prevent mistakes. Also you can use tags to versioning this manifest.jps and easy revert master to any tag.



          References




          • https://github.com/jelastic-jps/git-push-deploy

          • Generating Access Token

          • https://docs.jelastic.com/software-stacks-versions#app-servers

          • https://www.cakedc.com/git-workflow

          • https://stackoverflow.com/a/6872462/3957754






          share|improve this answer
























          • I already had a look at github.com/jelastic-jps/git-push-deploy , but it does not seem to fit my need. As far as I understand, the "Git-Push-Deploy Add-On" can be used to deploy application code to an existing environment. In my use case, I would like to recreate the environment itself. (Import of a manifest.json file to create an environment).

            – SomeBdyElse
            Jan 3 at 16:14











          • Do you want an empty environment?

            – JRichardsz
            Jan 3 at 22:50











          • I would like to be able to recreate the environment, including the application. This question is only about the environment part though, as we already have tools to deploy the application into an existing environment.

            – SomeBdyElse
            Jan 6 at 18:27












          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54022209%2fhow-to-version-a-private-jelastic-environment%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2















          A) How can I import an environment from a private git(hub) repository
          into Jelastic? Can I use the Dashboard Import URL feature to do so? Or
          do I have to use the CLI?



          B) How can I make sure that the manifest.json refers to the
          configuration file of the same version as the manifest.json itself?
          How do I pass the credentials for Jelastic to be able to retrieve the
          configuration files?




          To import an environment from a private Github repository into Jelastic, you should import manifest file URL with token through Dashboard Import feature.



          To do this, you need:




          • generate a token on Github https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/


          • in the manifest file, a token should be used for all links to the private repository


          • Dashboard Import -> URL -> https://raw.githubusercontent.com/{user}/{repo}/{branch}/manifest.jps



          Example for manifest file:



          type: install
          name: Test Private Repo

          baseUrl: https://raw.githubusercontent.com/{user}/{repo}/{branch}
          settings:
          fields:
          - name: token
          caption: Token
          type: string
          default:

          globals:
          token: ${settings.token}

          description: README.md?access_token=${globals.token}

          onInstall:
          # Shell script by URL
          - cmd: script.sh?access_token=${globals.token}

          # Base URL inside shell script
          - cmd: |
          wget '${baseUrl}/script.sh?access_token=${globals.token}' -O script.sh
          chmod +x script.sh
          ./script.sh

          # Javascript by URL
          - script: script.js?access_token=${globals.token}





          share|improve this answer


























          • Thank you for your quick reaction. The above manifest file would solve the issue. Unfortunately, adding a personal access token to the source code of the application is not an option for me. Is there any other way that the import dialog will accept credentials (such as BasicAuth credentials) to be used for fetching the manifest.json and all subsequent files? Would a dynamic baseUrl help? Example import URL (fine in curl): https://$token:@raw.githubusercontent.com/repo/$version/manifest.json Derived baseUrl: https://$token:@raw.githubusercontent.com/repo/$version/

            – SomeBdyElse
            Jan 6 at 18:16











          • We slightly changed the example in the answer, now you can use the token without inserting it into the manifest. HTTP Basic Auth support will be available in a future release.

            – Jelastic
            Jan 9 at 10:43











          • Great, thank you! I will have a look if that works. I will also check if I can leave out the static baseURL, so the import function will automatically pick the right version for the files.

            – SomeBdyElse
            Jan 11 at 7:40


















          2















          A) How can I import an environment from a private git(hub) repository
          into Jelastic? Can I use the Dashboard Import URL feature to do so? Or
          do I have to use the CLI?



          B) How can I make sure that the manifest.json refers to the
          configuration file of the same version as the manifest.json itself?
          How do I pass the credentials for Jelastic to be able to retrieve the
          configuration files?




          To import an environment from a private Github repository into Jelastic, you should import manifest file URL with token through Dashboard Import feature.



          To do this, you need:




          • generate a token on Github https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/


          • in the manifest file, a token should be used for all links to the private repository


          • Dashboard Import -> URL -> https://raw.githubusercontent.com/{user}/{repo}/{branch}/manifest.jps



          Example for manifest file:



          type: install
          name: Test Private Repo

          baseUrl: https://raw.githubusercontent.com/{user}/{repo}/{branch}
          settings:
          fields:
          - name: token
          caption: Token
          type: string
          default:

          globals:
          token: ${settings.token}

          description: README.md?access_token=${globals.token}

          onInstall:
          # Shell script by URL
          - cmd: script.sh?access_token=${globals.token}

          # Base URL inside shell script
          - cmd: |
          wget '${baseUrl}/script.sh?access_token=${globals.token}' -O script.sh
          chmod +x script.sh
          ./script.sh

          # Javascript by URL
          - script: script.js?access_token=${globals.token}





          share|improve this answer


























          • Thank you for your quick reaction. The above manifest file would solve the issue. Unfortunately, adding a personal access token to the source code of the application is not an option for me. Is there any other way that the import dialog will accept credentials (such as BasicAuth credentials) to be used for fetching the manifest.json and all subsequent files? Would a dynamic baseUrl help? Example import URL (fine in curl): https://$token:@raw.githubusercontent.com/repo/$version/manifest.json Derived baseUrl: https://$token:@raw.githubusercontent.com/repo/$version/

            – SomeBdyElse
            Jan 6 at 18:16











          • We slightly changed the example in the answer, now you can use the token without inserting it into the manifest. HTTP Basic Auth support will be available in a future release.

            – Jelastic
            Jan 9 at 10:43











          • Great, thank you! I will have a look if that works. I will also check if I can leave out the static baseURL, so the import function will automatically pick the right version for the files.

            – SomeBdyElse
            Jan 11 at 7:40
















          2












          2








          2








          A) How can I import an environment from a private git(hub) repository
          into Jelastic? Can I use the Dashboard Import URL feature to do so? Or
          do I have to use the CLI?



          B) How can I make sure that the manifest.json refers to the
          configuration file of the same version as the manifest.json itself?
          How do I pass the credentials for Jelastic to be able to retrieve the
          configuration files?




          To import an environment from a private Github repository into Jelastic, you should import manifest file URL with token through Dashboard Import feature.



          To do this, you need:




          • generate a token on Github https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/


          • in the manifest file, a token should be used for all links to the private repository


          • Dashboard Import -> URL -> https://raw.githubusercontent.com/{user}/{repo}/{branch}/manifest.jps



          Example for manifest file:



          type: install
          name: Test Private Repo

          baseUrl: https://raw.githubusercontent.com/{user}/{repo}/{branch}
          settings:
          fields:
          - name: token
          caption: Token
          type: string
          default:

          globals:
          token: ${settings.token}

          description: README.md?access_token=${globals.token}

          onInstall:
          # Shell script by URL
          - cmd: script.sh?access_token=${globals.token}

          # Base URL inside shell script
          - cmd: |
          wget '${baseUrl}/script.sh?access_token=${globals.token}' -O script.sh
          chmod +x script.sh
          ./script.sh

          # Javascript by URL
          - script: script.js?access_token=${globals.token}





          share|improve this answer
















          A) How can I import an environment from a private git(hub) repository
          into Jelastic? Can I use the Dashboard Import URL feature to do so? Or
          do I have to use the CLI?



          B) How can I make sure that the manifest.json refers to the
          configuration file of the same version as the manifest.json itself?
          How do I pass the credentials for Jelastic to be able to retrieve the
          configuration files?




          To import an environment from a private Github repository into Jelastic, you should import manifest file URL with token through Dashboard Import feature.



          To do this, you need:




          • generate a token on Github https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/


          • in the manifest file, a token should be used for all links to the private repository


          • Dashboard Import -> URL -> https://raw.githubusercontent.com/{user}/{repo}/{branch}/manifest.jps



          Example for manifest file:



          type: install
          name: Test Private Repo

          baseUrl: https://raw.githubusercontent.com/{user}/{repo}/{branch}
          settings:
          fields:
          - name: token
          caption: Token
          type: string
          default:

          globals:
          token: ${settings.token}

          description: README.md?access_token=${globals.token}

          onInstall:
          # Shell script by URL
          - cmd: script.sh?access_token=${globals.token}

          # Base URL inside shell script
          - cmd: |
          wget '${baseUrl}/script.sh?access_token=${globals.token}' -O script.sh
          chmod +x script.sh
          ./script.sh

          # Javascript by URL
          - script: script.js?access_token=${globals.token}






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 9 at 10:38

























          answered Jan 4 at 14:24









          JelasticJelastic

          1,1291613




          1,1291613













          • Thank you for your quick reaction. The above manifest file would solve the issue. Unfortunately, adding a personal access token to the source code of the application is not an option for me. Is there any other way that the import dialog will accept credentials (such as BasicAuth credentials) to be used for fetching the manifest.json and all subsequent files? Would a dynamic baseUrl help? Example import URL (fine in curl): https://$token:@raw.githubusercontent.com/repo/$version/manifest.json Derived baseUrl: https://$token:@raw.githubusercontent.com/repo/$version/

            – SomeBdyElse
            Jan 6 at 18:16











          • We slightly changed the example in the answer, now you can use the token without inserting it into the manifest. HTTP Basic Auth support will be available in a future release.

            – Jelastic
            Jan 9 at 10:43











          • Great, thank you! I will have a look if that works. I will also check if I can leave out the static baseURL, so the import function will automatically pick the right version for the files.

            – SomeBdyElse
            Jan 11 at 7:40





















          • Thank you for your quick reaction. The above manifest file would solve the issue. Unfortunately, adding a personal access token to the source code of the application is not an option for me. Is there any other way that the import dialog will accept credentials (such as BasicAuth credentials) to be used for fetching the manifest.json and all subsequent files? Would a dynamic baseUrl help? Example import URL (fine in curl): https://$token:@raw.githubusercontent.com/repo/$version/manifest.json Derived baseUrl: https://$token:@raw.githubusercontent.com/repo/$version/

            – SomeBdyElse
            Jan 6 at 18:16











          • We slightly changed the example in the answer, now you can use the token without inserting it into the manifest. HTTP Basic Auth support will be available in a future release.

            – Jelastic
            Jan 9 at 10:43











          • Great, thank you! I will have a look if that works. I will also check if I can leave out the static baseURL, so the import function will automatically pick the right version for the files.

            – SomeBdyElse
            Jan 11 at 7:40



















          Thank you for your quick reaction. The above manifest file would solve the issue. Unfortunately, adding a personal access token to the source code of the application is not an option for me. Is there any other way that the import dialog will accept credentials (such as BasicAuth credentials) to be used for fetching the manifest.json and all subsequent files? Would a dynamic baseUrl help? Example import URL (fine in curl): https://$token:@raw.githubusercontent.com/repo/$version/manifest.json Derived baseUrl: https://$token:@raw.githubusercontent.com/repo/$version/

          – SomeBdyElse
          Jan 6 at 18:16





          Thank you for your quick reaction. The above manifest file would solve the issue. Unfortunately, adding a personal access token to the source code of the application is not an option for me. Is there any other way that the import dialog will accept credentials (such as BasicAuth credentials) to be used for fetching the manifest.json and all subsequent files? Would a dynamic baseUrl help? Example import URL (fine in curl): https://$token:@raw.githubusercontent.com/repo/$version/manifest.json Derived baseUrl: https://$token:@raw.githubusercontent.com/repo/$version/

          – SomeBdyElse
          Jan 6 at 18:16













          We slightly changed the example in the answer, now you can use the token without inserting it into the manifest. HTTP Basic Auth support will be available in a future release.

          – Jelastic
          Jan 9 at 10:43





          We slightly changed the example in the answer, now you can use the token without inserting it into the manifest. HTTP Basic Auth support will be available in a future release.

          – Jelastic
          Jan 9 at 10:43













          Great, thank you! I will have a look if that works. I will also check if I can leave out the static baseURL, so the import function will automatically pick the right version for the files.

          – SomeBdyElse
          Jan 11 at 7:40







          Great, thank you! I will have a look if that works. I will also check if I can leave out the static baseURL, so the import function will automatically pick the right version for the files.

          – SomeBdyElse
          Jan 11 at 7:40















          3














          How can I import an environment from a private git(hub) repository into Jelastic? Can I use the Dashboard Import URL feature to do so? Or do I have to use the CLI?



          For this, We need to use the webhook functionality provided by any decent GIT SCM. Check generate token link.



          sample



          Within the opened installation window, specify the following data:





          • Git Repo Url - HTTPS link to your application repo


          • Branch - a project branch to be used


          • User- your Git account login


          • Token - personal Git access token for webhook generation (can be created within GitHub/GitLab account settings)


          • Environment name - target environment your application should be deployed to


          • Nodes - application server name (is fetched automatically upon selecting the environment)


          After success installation, all the further changes, committed to a source repository, will be automatically delivered to your environment inside Jelastic Cloud.



          How can I make sure that the manifest.json refers to the configuration file of the same version as the manifest.json itself? How do I pass the credentials for Jelastic to be able to retrieve the configuration files?



          As we are using Jelastic, We just can use the Jelastic provided functionalities. Currently you can set the branch name, so you could have :




          • As many repositories as manifest.jps you have

          • As many branches as manifest.jps you have


          Is there a best-practice?



          Bet practice could be use As many repositories as manifest.jps you have and use git flow to versioning:



          git-flow



          Master as the stable and production version of manifest.jps. Any change of this manifest.jps must be audited or reviewed by a team in order to prevent mistakes. Also you can use tags to versioning this manifest.jps and easy revert master to any tag.



          References




          • https://github.com/jelastic-jps/git-push-deploy

          • Generating Access Token

          • https://docs.jelastic.com/software-stacks-versions#app-servers

          • https://www.cakedc.com/git-workflow

          • https://stackoverflow.com/a/6872462/3957754






          share|improve this answer
























          • I already had a look at github.com/jelastic-jps/git-push-deploy , but it does not seem to fit my need. As far as I understand, the "Git-Push-Deploy Add-On" can be used to deploy application code to an existing environment. In my use case, I would like to recreate the environment itself. (Import of a manifest.json file to create an environment).

            – SomeBdyElse
            Jan 3 at 16:14











          • Do you want an empty environment?

            – JRichardsz
            Jan 3 at 22:50











          • I would like to be able to recreate the environment, including the application. This question is only about the environment part though, as we already have tools to deploy the application into an existing environment.

            – SomeBdyElse
            Jan 6 at 18:27
















          3














          How can I import an environment from a private git(hub) repository into Jelastic? Can I use the Dashboard Import URL feature to do so? Or do I have to use the CLI?



          For this, We need to use the webhook functionality provided by any decent GIT SCM. Check generate token link.



          sample



          Within the opened installation window, specify the following data:





          • Git Repo Url - HTTPS link to your application repo


          • Branch - a project branch to be used


          • User- your Git account login


          • Token - personal Git access token for webhook generation (can be created within GitHub/GitLab account settings)


          • Environment name - target environment your application should be deployed to


          • Nodes - application server name (is fetched automatically upon selecting the environment)


          After success installation, all the further changes, committed to a source repository, will be automatically delivered to your environment inside Jelastic Cloud.



          How can I make sure that the manifest.json refers to the configuration file of the same version as the manifest.json itself? How do I pass the credentials for Jelastic to be able to retrieve the configuration files?



          As we are using Jelastic, We just can use the Jelastic provided functionalities. Currently you can set the branch name, so you could have :




          • As many repositories as manifest.jps you have

          • As many branches as manifest.jps you have


          Is there a best-practice?



          Bet practice could be use As many repositories as manifest.jps you have and use git flow to versioning:



          git-flow



          Master as the stable and production version of manifest.jps. Any change of this manifest.jps must be audited or reviewed by a team in order to prevent mistakes. Also you can use tags to versioning this manifest.jps and easy revert master to any tag.



          References




          • https://github.com/jelastic-jps/git-push-deploy

          • Generating Access Token

          • https://docs.jelastic.com/software-stacks-versions#app-servers

          • https://www.cakedc.com/git-workflow

          • https://stackoverflow.com/a/6872462/3957754






          share|improve this answer
























          • I already had a look at github.com/jelastic-jps/git-push-deploy , but it does not seem to fit my need. As far as I understand, the "Git-Push-Deploy Add-On" can be used to deploy application code to an existing environment. In my use case, I would like to recreate the environment itself. (Import of a manifest.json file to create an environment).

            – SomeBdyElse
            Jan 3 at 16:14











          • Do you want an empty environment?

            – JRichardsz
            Jan 3 at 22:50











          • I would like to be able to recreate the environment, including the application. This question is only about the environment part though, as we already have tools to deploy the application into an existing environment.

            – SomeBdyElse
            Jan 6 at 18:27














          3












          3








          3







          How can I import an environment from a private git(hub) repository into Jelastic? Can I use the Dashboard Import URL feature to do so? Or do I have to use the CLI?



          For this, We need to use the webhook functionality provided by any decent GIT SCM. Check generate token link.



          sample



          Within the opened installation window, specify the following data:





          • Git Repo Url - HTTPS link to your application repo


          • Branch - a project branch to be used


          • User- your Git account login


          • Token - personal Git access token for webhook generation (can be created within GitHub/GitLab account settings)


          • Environment name - target environment your application should be deployed to


          • Nodes - application server name (is fetched automatically upon selecting the environment)


          After success installation, all the further changes, committed to a source repository, will be automatically delivered to your environment inside Jelastic Cloud.



          How can I make sure that the manifest.json refers to the configuration file of the same version as the manifest.json itself? How do I pass the credentials for Jelastic to be able to retrieve the configuration files?



          As we are using Jelastic, We just can use the Jelastic provided functionalities. Currently you can set the branch name, so you could have :




          • As many repositories as manifest.jps you have

          • As many branches as manifest.jps you have


          Is there a best-practice?



          Bet practice could be use As many repositories as manifest.jps you have and use git flow to versioning:



          git-flow



          Master as the stable and production version of manifest.jps. Any change of this manifest.jps must be audited or reviewed by a team in order to prevent mistakes. Also you can use tags to versioning this manifest.jps and easy revert master to any tag.



          References




          • https://github.com/jelastic-jps/git-push-deploy

          • Generating Access Token

          • https://docs.jelastic.com/software-stacks-versions#app-servers

          • https://www.cakedc.com/git-workflow

          • https://stackoverflow.com/a/6872462/3957754






          share|improve this answer













          How can I import an environment from a private git(hub) repository into Jelastic? Can I use the Dashboard Import URL feature to do so? Or do I have to use the CLI?



          For this, We need to use the webhook functionality provided by any decent GIT SCM. Check generate token link.



          sample



          Within the opened installation window, specify the following data:





          • Git Repo Url - HTTPS link to your application repo


          • Branch - a project branch to be used


          • User- your Git account login


          • Token - personal Git access token for webhook generation (can be created within GitHub/GitLab account settings)


          • Environment name - target environment your application should be deployed to


          • Nodes - application server name (is fetched automatically upon selecting the environment)


          After success installation, all the further changes, committed to a source repository, will be automatically delivered to your environment inside Jelastic Cloud.



          How can I make sure that the manifest.json refers to the configuration file of the same version as the manifest.json itself? How do I pass the credentials for Jelastic to be able to retrieve the configuration files?



          As we are using Jelastic, We just can use the Jelastic provided functionalities. Currently you can set the branch name, so you could have :




          • As many repositories as manifest.jps you have

          • As many branches as manifest.jps you have


          Is there a best-practice?



          Bet practice could be use As many repositories as manifest.jps you have and use git flow to versioning:



          git-flow



          Master as the stable and production version of manifest.jps. Any change of this manifest.jps must be audited or reviewed by a team in order to prevent mistakes. Also you can use tags to versioning this manifest.jps and easy revert master to any tag.



          References




          • https://github.com/jelastic-jps/git-push-deploy

          • Generating Access Token

          • https://docs.jelastic.com/software-stacks-versions#app-servers

          • https://www.cakedc.com/git-workflow

          • https://stackoverflow.com/a/6872462/3957754







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 3 at 14:57









          JRichardszJRichardsz

          2,1401643




          2,1401643













          • I already had a look at github.com/jelastic-jps/git-push-deploy , but it does not seem to fit my need. As far as I understand, the "Git-Push-Deploy Add-On" can be used to deploy application code to an existing environment. In my use case, I would like to recreate the environment itself. (Import of a manifest.json file to create an environment).

            – SomeBdyElse
            Jan 3 at 16:14











          • Do you want an empty environment?

            – JRichardsz
            Jan 3 at 22:50











          • I would like to be able to recreate the environment, including the application. This question is only about the environment part though, as we already have tools to deploy the application into an existing environment.

            – SomeBdyElse
            Jan 6 at 18:27



















          • I already had a look at github.com/jelastic-jps/git-push-deploy , but it does not seem to fit my need. As far as I understand, the "Git-Push-Deploy Add-On" can be used to deploy application code to an existing environment. In my use case, I would like to recreate the environment itself. (Import of a manifest.json file to create an environment).

            – SomeBdyElse
            Jan 3 at 16:14











          • Do you want an empty environment?

            – JRichardsz
            Jan 3 at 22:50











          • I would like to be able to recreate the environment, including the application. This question is only about the environment part though, as we already have tools to deploy the application into an existing environment.

            – SomeBdyElse
            Jan 6 at 18:27

















          I already had a look at github.com/jelastic-jps/git-push-deploy , but it does not seem to fit my need. As far as I understand, the "Git-Push-Deploy Add-On" can be used to deploy application code to an existing environment. In my use case, I would like to recreate the environment itself. (Import of a manifest.json file to create an environment).

          – SomeBdyElse
          Jan 3 at 16:14





          I already had a look at github.com/jelastic-jps/git-push-deploy , but it does not seem to fit my need. As far as I understand, the "Git-Push-Deploy Add-On" can be used to deploy application code to an existing environment. In my use case, I would like to recreate the environment itself. (Import of a manifest.json file to create an environment).

          – SomeBdyElse
          Jan 3 at 16:14













          Do you want an empty environment?

          – JRichardsz
          Jan 3 at 22:50





          Do you want an empty environment?

          – JRichardsz
          Jan 3 at 22:50













          I would like to be able to recreate the environment, including the application. This question is only about the environment part though, as we already have tools to deploy the application into an existing environment.

          – SomeBdyElse
          Jan 6 at 18:27





          I would like to be able to recreate the environment, including the application. This question is only about the environment part though, as we already have tools to deploy the application into an existing environment.

          – SomeBdyElse
          Jan 6 at 18:27


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54022209%2fhow-to-version-a-private-jelastic-environment%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith