1 2 Previous Next 21 Replies Latest reply on May 6, 2015 5:19 AM by gytis Go to original post
      • 15. Re: Distributing Narayana JTS via Docker
        gytis

        The easiest way is to mount a host directory using "-v /host/object/store/dir:/home/tx-object-store". Docker container is set up to use /home/tx-object-store as a object store location.

         

        Or to set up JDBC object store:

        • It is possible to mount host directory containing jbossts-properties.xml to "/home/narayana/etc", where Docker container takes config from.
        • Or set NARAYANA_OPTS environment variable using "-e "NARAYANA_OPTS=-D...."".

         

        However, I have not tested it with object store yet.

        • 16. Re: Distributing Narayana JTS via Docker
          gytis

          And yes, there will be a quickstart and/or blog post about it.

           

          Currently I have a simple test in my quickstarts repo: quickstart/jts-docker at master-JBTM-2296 · Gytis/quickstart · GitHub

          • 17. Re: Distributing Narayana JTS via Docker
            tomjenkinson

            Yes - there will be a blog entry and quickstart  

             

            We aren't actually intending to document the use case with the object store purely local to the docker container. The configurations we do intend to document are:

             

            1. Using a shared/mapped folder from the docker host to the docker container for storing the contents of the default ShadowNoFileLockStore. Here we will override the single configuration setting of the object store location with a system property (-DObjectStoreEnvironmentBean.objectStoreDir="/home/docker/tx-object-store") as this is going to be OK for any user.

            2. We then intend to illustrate how a user can configure a jbossts-properties.xml file in a shared folder to customize any options (including the object store location). This will be demonstrated by configuring the use case where a user wishes to store the logs in an H2 database running on the docker host (but could be anywhere or any vendor). It would be possible to just override the object store config with system properties similar to option 1, something like:

            -DObjectStoreEnvironmentBean.objectStoreType="com.arjuna.ats.internal.arjuna.objectstore.jdbc.JDBCStore" --DObjectStoreEnvironmentBean.jdbcAccess="com.arjuna.ats.internal.arjuna.objectstore.jdbc.accessors.DynamicDataSourceJDBCAccess;ClassName=org.h2.jdbcx.JdbcDataSource;URL=jdbc:h2:./h2/JBTMDB;User=sa;Password=sa"

            The reason we think overriding the entire config file is a better option for variant 2 is because those JDBCObjectStore config options are much more likely to be environmental (database location/credentials) is going to be most flexible.

            • 18. Re: Distributing Narayana JTS via Docker
              marklittle

              It all needs testing then

              • 19. Re: Distributing Narayana JTS via Docker
                marklittle

                I'd still document the purely local object store case, i.e., within the docker image. This is the simplest use case for a developer and whilst it's not something they should use in production, it's probably the easiest to get someone going - it has the least steps to go through and hence the least chance of making a mistake.

                 

                BTW why wouldn't we simply make a docker image for each external object store use case? Ideally I'd want to be able to go download an image and it's all configured for me. Of course I may need to make some changes on my local machine, but I don't want to touch the docker image. Maybe that is what you're describing?

                • 20. Re: Distributing Narayana JTS via Docker
                  tomjenkinson

                  Mark Little wrote:

                   

                  I'd still document the purely local object store case, i.e., within the docker image. This is the simplest use case for a developer and whilst it's not something they should use in production, it's probably the easiest to get someone going - it has the least steps to go through and hence the least chance of making a mistake.

                   

                  BTW why wouldn't we simply make a docker image for each external object store use case? Ideally I'd want to be able to go download an image and it's all configured for me. Of course I may need to make some changes on my local machine, but I don't want to touch the docker image. Maybe that is what you're describing?

                   

                  Sure, we can have a third variant that has the purely local storage option.

                   

                  In terms of creating images for all of the external object store use cases, that could be quite an undertaking. Initially I think a docker image of a postgres database for the ObjectStore should be enough and jbossts-properties.xml to access the same should be the initial scope of the work. I do agree that Gytis should create the structure in our repo such that the community (and devs) can then contribute PRs of the variants as they are then developed. It would be useful for Gytis to create Jiras for the various object stores before completing the task.

                  • 21. Re: Distributing Narayana JTS via Docker
                    gytis

                    Sorry for the delay. My last message from a few weeks ago wasn't saved, while I thought it did...

                     

                    Here are the updated name server and transaction service images: https://github.com/Gytis/narayana-docker/tree/master/jts.

                    I've added extra configurations and a couple of unit tests.

                     

                    And here is the quickstart: https://github.com/Gytis/quickstart/tree/master-JBTM-2296/jts-docker.

                    All the code is the same. However, readme was extended to explain how to use different types of object stores.

                     

                    Any ideas?

                    1 2 Previous Next