9 Replies Latest reply on Jun 27, 2014 8:04 AM by edovale

    Automated deployments via JCA.

    edovale

      Hi,

      We are toying with the idea of automating the deployments of the plugins we use to our hosted jive instances. We have an internal Jenkins instance running tests and building this plugins in a continuous manner and want to leverage this tools setup push button deployments.

      I was wondering if the JCA tool exposes any APIs that we can leverage for this?

       

      Thanks in advance.

       

      cc: Jive Hosting, Jive Hosting Group

        • Re: Automated deployments via JCA.
          edovale

          Karl Cyr,

          Can you help me get some attention on this question from some one in the hosting department?

           

          cc: Venkat Iyer

          • Re: Automated deployments via JCA.

            Hi Erick, Dzmitry and Mike,

             

            Unfortunately at this time there are no external JCA APIs to allow automation of plugin deployments.

            We are absolutely looking into ways to allow for more self-service and control from the JCA portal through UI/UX and possibly APIs.

            As you know, plugin deployment would also entail a restart of the target instance and could of course fail the restart if the plugin(s) were to be incompatible with version (or introduce a framework bug).

             

            It would be of great help to Jive, if you could share more detail on your thoughts of how JCA could optimally integrate into your CI/CD pipelines.

              • Re: Automated deployments via JCA.
                edovale

                Hi Timur Kiykioglu,

                thanks for your reply.

                In our case we build a set of jive plugins using jenkins and just want to have the ability to deploy them with the click of a button. Although an API is not strictly needed in order to do this, it would simplify things enormously. I have achieve automated deployments via the JCA using curl before but this approach is flaky at best.

                 

                Ideally an API looking something like:

                 

                POST /plugins

                returning 202 signalling acceptance if it can be accepted at the time of request and including a resource to monitor progress. We would then start pinging the monitoring resource until a failure or success response is obtained.

                This should be pretty straight forward for you to implement considering that all this functionality already exists in JCA; it would only mean adding the RESTful API layer.

                 

                Thanks!!

                 

                Erick.

                  • Re: Automated deployments via JCA.

                    I assume you would want to do this only on the UAT instance.

                      • Re: Automated deployments via JCA.
                        edovale

                        Nope. Why not everywhere?

                        On Jun 23, 2014 10:35 PM, "Timur Kiykioglu" <

                          • Re: Automated deployments via JCA.

                            POST /plugins

                            returning 202 signalling acceptance if it can be accepted at the time of request and including a resource to monitor progress. We would then start pinging the monitoring resource until a failure or success response is obtained.

                            This should be pretty straight forward for you to implement considering that all this functionality already exists in JCA; it would only mean adding the RESTful API layer.

                             

                            I cannot commit to any solution or feature at this time, but let me layout some possible direction.

                            1. JCA adds RESTful endpoint(s) for uploading and deleting plugins to your jive instance: Upload/Delete Plugins endpoint and associated deploy task(s).
                              • 202 async with deploy task ID.  JCA deploy task will be scheduled to upload or delete the plugins so that they would be installed or removed upon the next restart.
                            2. JCA adds RESTful endpoint(s) for stop and (re)start of your jive instance: Stop/(Re)Start Endpoint and associated deploy task(s)
                              • 202 async with deploy task ID. JCA deploy task will be scheduled to perform the operation.
                            3. JCA adds RESTful endpoint(s) for getting status on the 2 new deploy tasks:
                              1. Task: Upload/Delete Plugins
                              2. Task: Stop/(Re)Start

                             

                            Possible usage as part of jenkins post build/test job:

                            1. Use Upload Plugins endpoint(s) to schedule deploy task to upload version n+1 plugin artifact(s)
                            2. If 202, check status until it completes successfully or not.
                              1. If successful, skip to #3
                              2. If not successful, see error code/msg
                            3. Use Stop/(Re)Start endpoint to schedule deploy task (restart)
                            4. If 202, check status until it completes successfully or not.
                              1. If successful, then jive instance has successfully started with version n+1 plugin artifact(s)
                              2. If not successful, then jive instance could not startup - assume bad plugins and proceed with rollback to previous plugin versions
                                • Repeat previous steps with version n artifact(s) to accomplish rollback
                                • Jive Logs (Restful API available) should allow you to debug the issue with the n+1 plugin artifacts.
                              • Re: Automated deployments via JCA.
                                edovale

                                Hi Timur Kiykioglu,

                                What you describe looks really good to me.

                                One question though:

                                Would it be possible to compress the upload and restart operations in a single step called deployment? I am thinking that maybe you can take the time to execute the deployment task in case the user doesn't want to do it right away.

                                What is the benefit of requiring a call to restart after deploying a plugin?

                                 

                                Thanks!!