You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Humphrey <hm...@gmail.com> on 2017/11/27 13:13:35 UTC

Ignite in docker (Native Persistence)

Has anyone use Ignite Native Persistence with Docker? 
Is there a solution on how to map the Volume dynamically? And how about when
you restart the whole cluster, how does it maps all volumes?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite in docker (Native Persistence)

Posted by Dave Harvey <dh...@jobcase.com>.
This is the ECS task we use to create the container.

Caveat:   we have a custom docker image with some enhancements to run.sh.
Especially around consistent ID and what we call Autobaseline, and support
for AWS instance storage (Ignite persistence is useless for us with
EBS/GP2). I'll generate a pull request later with this customization to
make it clearer.


cat << EOF > $1

    {



        "volumes": [

            {

                "host": { "sourcePath": "/ContainerLogs"},

                "name": "ContainerLogs"

            },

            {

                "host": {

                    "sourcePath": "/IgniteStorage"

                },

                "name": "IgnitePersistenceStorage"

            },

            {

                "host": {

                    "sourcePath": "/var/run/jobcase-snapshot.sock"

                },

                "name": "SnapshotSocket"

            }

        ],


        "requiresCompatibilities": [

            "EC2"

        ],

        "containerDefinitions": [

            {

                "environment": [

                    {

                        "name": "CONFIG_URI",

                        "value": "${CONFIG_URI}"

                    },

                    {

                        "name": "IGNITE_CLUSTER_NAME",

                        "value": "${IGNITE_CLUSTER_NAME}"

                    },

                    {

                        "name": "IGNITE_DISCOVERY_S3_BUCKETNAME",

                        "value": "${DISCOVERY_BUCKET}"

                    },

                     {

                        "name": "JVM_METASPACE_SIZE",

                        "value": "${JVM_METASPACE_SIZE}"

                    },

                    {

                        "name": "JVM_HEAP_SIZE",

                        "value": "${JVM_HEAP_SIZE}"

                    },

                    {

                        "name": "JOBCASE_LOGS",

                        "value": "/ContainerLogs/${IGNITE_CLUSTER_NAME}"

                    },



                    {

                        "name": "IGNITE_QUIET",

                        "value": "${IGNITE_QUIET}"

                    },

                    {

                        "name": "IGNITE_CLIENT_MODE",

                        "value": "false"

                    },

                    {

                        "name": "IGNITE_JDBC_PORT",

                        "value": "10800"

                    },

                    {

                        "name": "IGNITE_SERVER_PORT",

                        "value": "11211"

                    },

                    {

                        "name": "IGNITE_COMMUNICATION_PORT",

                        "value": "47100"

                    },

                    {

                        "name": "IGNITE_DISCOVERY_PORT",

                        "value": "47500"

                    },

                    {

                        "name": "IGNITE_JMX_PORT",

                        "value": "9000"

                    },

                    {

                        "name": "IGNITE_PERSISTENT_STORE",

                        "value": "/IgnitePersistenceStorage"

                    },

                    {

                        "name" : "IGNITE_AUTO_BASELINE_DELAY",

                        "value" : "${IGNITE_AUTO_BASELINE_DELAY}"

                    },

                    {

                        "name": "IGNITE_DEFAULT_REGION_SIZE",

                        "value": "${IGNITE_DEFAULT_REGION_SIZE}"

                    },

                    {

                        "name" : "IGNITE_REBALANCE_THREAD_POOL_SIZE",

                        "value" : "${IGNITE_REBALANCE_THREAD_POOL_SIZE}"

                    },

                    {

                        "name" : "IGNITE_DATA_STREAMER_POOL_SIZE",

                        "value" : "${IGNITE_DATA_STREAMER_POOL_SIZE}"

                    },

                    {

                        "name" : "IGNITE_STRIPED_POOL_SIZE",

                        "value" : "${IGNITE_STRIPED_POOL_SIZE}"

                    },

                    {

                        "name" : "IGNITE_ASYNC_CALLBACK_POOL_SIZE",

                        "value" : "${IGNITE_ASYNC_CALLBACK_POOL_SIZE}"

                    },

                    {

                        "name" : "JVM_ADDITIONAL_OPTS",

                        "value" : "${JVM_ADDITIONAL_OPTS}"

                    }



                ],

                "name": "IgniteImage",

                "mountPoints": [

                    {

                        "sourceVolume": "ContainerLogs",

                        "containerPath": "/ContainerLogs"

                    },



                    {

                        "sourceVolume": "IgnitePersistenceStorage",

                        "containerPath": "/IgnitePersistenceStorage"

                    },

                    {

                        "sourceVolume": "SnapshotSocket",

                        "containerPath": "/var/run/jobcase-snapshot.sock"

                    }

                ],

                "image": "
jobcase-platform-docker.jfrog.io/apacheignite-jobcase:${IGNITE_IMAGE_TAG}",

                "portMappings": [

                    {

                        "protocol": "tcp",

                        "containerPort": 11211,

                        "hostPort": 11211

                    },

                    {

                        "protocol": "tcp",

                        "containerPort": 47100,

                        "hostPort": 47100

                    },

                    {

                        "protocol": "tcp",

                        "containerPort": 47500,

                        "hostPort": 47500

                    },

                    {

                        "protocol": "tcp",

                        "containerPort": 9000,

                        "hostPort": 9000

                    },

                    {

                        "protocol": "tcp",

                        "containerPort": 10800,

                        "hostPort": 10800

                    }

                ],

                "logConfiguration": {

                    "logDriver": "json-file"

                },

                "healthCheck": {



                    "command": ["CMD-SHELL", "\${IGNITE_HOME}/bin/control.sh
--baseline | grep 'Cluster state: active'" ],

                    "interval": 30,

                    "timeout": 30,

                    "retries": 3,

                    "startPeriod": 300

                 },

                "ulimits": [

                    {

                        "softLimit": 1000000,

                        "name": "nofile",

                        "hardLimit": 1000000

                    }

                ],

                "memoryReservation" : $MEMORY_RESERVATION,


                "essential": true,

                "volumesFrom": [],

                "dockerLabels": {

                    "com.datadoghq.ad.check_names": "[\"jmx\"]",

                    "com.datadoghq.ad.instances": "[ {\"host\": \"localhost
\", \"port\":\"9000\"}]",



                    "com.datadoghq.ad.init_configs": "[{}]"

                }

            }

        ]

}

EOF

On Tue, Dec 18, 2018 at 9:08 AM Dave Harvey <dh...@jobcase.com> wrote:

> See attached, which we use in our AWS ECS containers.
>
> Note that beside WAL and data, the work directory needs persistence,
> because it has all the typeID mappings.
>
> On Tue, Dec 18, 2018 at 7:32 AM Павлухин Иван <vo...@gmail.com> wrote:
>
>> Hi Rahul,
>>
>> Could you please share an ignite configuration and how do you launch a
>> docker container with Ignite?
>> Do you see something in your ignitedata/persistence ignitedata/wal
>> ignitedata/wal/archive after container stop?
>> I guess you can configure a consistentId by configuring
>> IgniteConfiguration bean property:
>> <bean id="ignite.cfg"
>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>   <property name="consistentId" value="12345"/>
>>   ...
>> </bean>
>> вт, 18 дек. 2018 г. в 12:57, RahulMetangale <rahul.metangale@hotmail.com
>> >:
>> >
>> > Hi All,
>> >
>> > I followed following steps for persistence in docker but i am observing
>> that
>> > cache is not retained after restart. From documentation i see that
>> > consisitentID need to be set to retain cache after restart but i am not
>> sure
>> > how it can set in configuration xml file. Any help is greatly
>> appreciated.
>> >
>> > Here are the steps i followed:
>> > 1. Created following folder on docker host in var directory
>> > mkdir -p ignitedata/persistence ignitedata/wal ignitedata/wal/archive
>> > 2. Updated default-config.xml
>> >
>> >
>> > 3. Ran following command to deploy ignite docker container. I updated
>> > default-config.xml inside container hence i did not pass the CONFIG_URI.
>> >
>> >
>> >
>> >
>> >
>> > --
>> > Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>>
>>
>> --
>> Best regards,
>> Ivan Pavlukhin
>>
>>

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.

Re: Ignite in docker (Native Persistence)

Posted by Dave Harvey <dh...@jobcase.com>.
See attached, which we use in our AWS ECS containers.

Note that beside WAL and data, the work directory needs persistence,
because it has all the typeID mappings.

On Tue, Dec 18, 2018 at 7:32 AM Павлухин Иван <vo...@gmail.com> wrote:

> Hi Rahul,
>
> Could you please share an ignite configuration and how do you launch a
> docker container with Ignite?
> Do you see something in your ignitedata/persistence ignitedata/wal
> ignitedata/wal/archive after container stop?
> I guess you can configure a consistentId by configuring
> IgniteConfiguration bean property:
> <bean id="ignite.cfg"
> class="org.apache.ignite.configuration.IgniteConfiguration">
>   <property name="consistentId" value="12345"/>
>   ...
> </bean>
> вт, 18 дек. 2018 г. в 12:57, RahulMetangale <ra...@hotmail.com>:
> >
> > Hi All,
> >
> > I followed following steps for persistence in docker but i am observing
> that
> > cache is not retained after restart. From documentation i see that
> > consisitentID need to be set to retain cache after restart but i am not
> sure
> > how it can set in configuration xml file. Any help is greatly
> appreciated.
> >
> > Here are the steps i followed:
> > 1. Created following folder on docker host in var directory
> > mkdir -p ignitedata/persistence ignitedata/wal ignitedata/wal/archive
> > 2. Updated default-config.xml
> >
> >
> > 3. Ran following command to deploy ignite docker container. I updated
> > default-config.xml inside container hence i did not pass the CONFIG_URI.
> >
> >
> >
> >
> >
> > --
> > Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
>
>
> --
> Best regards,
> Ivan Pavlukhin
>
>

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.

Re: Ignite in docker (Native Persistence)

Posted by Павлухин Иван <vo...@gmail.com>.
Hi Rahul,

Could you please share an ignite configuration and how do you launch a
docker container with Ignite?
Do you see something in your ignitedata/persistence ignitedata/wal
ignitedata/wal/archive after container stop?
I guess you can configure a consistentId by configuring
IgniteConfiguration bean property:
<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
  <property name="consistentId" value="12345"/>
  ...
</bean>
вт, 18 дек. 2018 г. в 12:57, RahulMetangale <ra...@hotmail.com>:
>
> Hi All,
>
> I followed following steps for persistence in docker but i am observing that
> cache is not retained after restart. From documentation i see that
> consisitentID need to be set to retain cache after restart but i am not sure
> how it can set in configuration xml file. Any help is greatly appreciated.
>
> Here are the steps i followed:
> 1. Created following folder on docker host in var directory
> mkdir -p ignitedata/persistence ignitedata/wal ignitedata/wal/archive
> 2. Updated default-config.xml
>
>
> 3. Ran following command to deploy ignite docker container. I updated
> default-config.xml inside container hence i did not pass the CONFIG_URI.
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/



-- 
Best regards,
Ivan Pavlukhin

Re: Ignite in docker (Native Persistence)

Posted by RahulMetangale <ra...@hotmail.com>.
Hi All,

I followed following steps for persistence in docker but i am observing that
cache is not retained after restart. From documentation i see that
consisitentID need to be set to retain cache after restart but i am not sure
how it can set in configuration xml file. Any help is greatly appreciated.

Here are the steps i followed:
1. Created following folder on docker host in var directory
mkdir -p ignitedata/persistence ignitedata/wal ignitedata/wal/archive
2. Updated default-config.xml 


3. Ran following command to deploy ignite docker container. I updated
default-config.xml inside container hence i did not pass the CONFIG_URI.





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite in docker (Native Persistence)

Posted by Denis Magda <dm...@apache.org>.
Nick,

Excellent, here is a ticket! Please reassign it on me once you complete with the doc:
https://issues.apache.org/jira/browse/IGNITE-7132

—
Denis

> On Dec 7, 2017, at 3:57 AM, Nikolai Tikhonov <nt...@apache.org> wrote:
> 
> Hello!
> 
> Yes, sure! I'll investigate this question and update our doc.
> 
> On Thu, Dec 7, 2017 at 9:57 AM, Denis Magda <dmagda@apache.org <ma...@apache.org>> wrote:
> Nick,
> 
> As one of Ignite docker maintainers, could you please investigate one how to map Ignite persistence to docker volumes:
> https://docs.docker.com/engine/admin/volumes/volumes/#use-a-read-only-volume <https://docs.docker.com/engine/admin/volumes/volumes/#use-a-read-only-volume>
> 
> and update the docker documentation:
> https://apacheignite.readme.io/docs/docker-deployment <https://apacheignite.readme.io/docs/docker-deployment>
> 
> —
> Denis
> 
>> On Dec 1, 2017, at 8:40 AM, afedotov <alexander.fedotoff@gmail.com <ma...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> You need to create volumes and map them to the ${IGNITE_HOME}/work/db or any
>> other path that
>> you might have specified via setPersistentStorePath. These volumes should
>> outlive the Ignite containers
>> and thus it will be possible to reuse them on restart.
>> 
>> It's worth trying docker-compose, docker-swarm or kubernetes, depending on
>> your needs.
>> For example, Kubernetes provides a wide variety of volume options
>> https://kubernetes.io/docs/concepts/storage/volumes/ <https://kubernetes.io/docs/concepts/storage/volumes/>
>> 
>> 
> Has anyone use Ignite Native Persistence with Docker? 
> Is there a solution on how to map the Volume dynamically? And how about when
> you restart the whole cluster, how does it maps all volumes?
>> 
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/ <http://apache-ignite-users.70518.x6.nabble.com/>
> 
> 


Re: Ignite in docker (Native Persistence)

Posted by Denis Magda <dm...@apache.org>.
Nick,

Excellent, here is a ticket! Please reassign it on me once you complete with the doc:
https://issues.apache.org/jira/browse/IGNITE-7132

—
Denis

> On Dec 7, 2017, at 3:57 AM, Nikolai Tikhonov <nt...@apache.org> wrote:
> 
> Hello!
> 
> Yes, sure! I'll investigate this question and update our doc.
> 
> On Thu, Dec 7, 2017 at 9:57 AM, Denis Magda <dmagda@apache.org <ma...@apache.org>> wrote:
> Nick,
> 
> As one of Ignite docker maintainers, could you please investigate one how to map Ignite persistence to docker volumes:
> https://docs.docker.com/engine/admin/volumes/volumes/#use-a-read-only-volume <https://docs.docker.com/engine/admin/volumes/volumes/#use-a-read-only-volume>
> 
> and update the docker documentation:
> https://apacheignite.readme.io/docs/docker-deployment <https://apacheignite.readme.io/docs/docker-deployment>
> 
> —
> Denis
> 
>> On Dec 1, 2017, at 8:40 AM, afedotov <alexander.fedotoff@gmail.com <ma...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> You need to create volumes and map them to the ${IGNITE_HOME}/work/db or any
>> other path that
>> you might have specified via setPersistentStorePath. These volumes should
>> outlive the Ignite containers
>> and thus it will be possible to reuse them on restart.
>> 
>> It's worth trying docker-compose, docker-swarm or kubernetes, depending on
>> your needs.
>> For example, Kubernetes provides a wide variety of volume options
>> https://kubernetes.io/docs/concepts/storage/volumes/ <https://kubernetes.io/docs/concepts/storage/volumes/>
>> 
>> 
> Has anyone use Ignite Native Persistence with Docker? 
> Is there a solution on how to map the Volume dynamically? And how about when
> you restart the whole cluster, how does it maps all volumes?
>> 
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/ <http://apache-ignite-users.70518.x6.nabble.com/>
> 
> 


Re: Ignite in docker (Native Persistence)

Posted by Nikolai Tikhonov <nt...@apache.org>.
Hello!

Yes, sure! I'll investigate this question and update our doc.

On Thu, Dec 7, 2017 at 9:57 AM, Denis Magda <dm...@apache.org> wrote:

> Nick,
>
> As one of Ignite docker maintainers, could you please investigate one how
> to map Ignite persistence to docker volumes:
> https://docs.docker.com/engine/admin/volumes/volumes/#
> use-a-read-only-volume
>
> and update the docker documentation:
> https://apacheignite.readme.io/docs/docker-deployment
>
> —
> Denis
>
> On Dec 1, 2017, at 8:40 AM, afedotov <al...@gmail.com> wrote:
>
> Hi,
>
> You need to create volumes and map them to the ${IGNITE_HOME}/work/db or
> any
> other path that
> you might have specified via setPersistentStorePath. These volumes should
> outlive the Ignite containers
> and thus it will be possible to reuse them on restart.
>
> It's worth trying docker-compose, docker-swarm or kubernetes, depending on
> your needs.
> For example, Kubernetes provides a wide variety of volume options
> https://kubernetes.io/docs/concepts/storage/volumes/
>
>
> Has anyone use Ignite Native Persistence with Docker?
> Is there a solution on how to map the Volume dynamically? And how about
> when
> you restart the whole cluster, how does it maps all volumes?
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
>
>

Re: Ignite in docker (Native Persistence)

Posted by Nikolai Tikhonov <nt...@apache.org>.
Hello!

Yes, sure! I'll investigate this question and update our doc.

On Thu, Dec 7, 2017 at 9:57 AM, Denis Magda <dm...@apache.org> wrote:

> Nick,
>
> As one of Ignite docker maintainers, could you please investigate one how
> to map Ignite persistence to docker volumes:
> https://docs.docker.com/engine/admin/volumes/volumes/#
> use-a-read-only-volume
>
> and update the docker documentation:
> https://apacheignite.readme.io/docs/docker-deployment
>
> —
> Denis
>
> On Dec 1, 2017, at 8:40 AM, afedotov <al...@gmail.com> wrote:
>
> Hi,
>
> You need to create volumes and map them to the ${IGNITE_HOME}/work/db or
> any
> other path that
> you might have specified via setPersistentStorePath. These volumes should
> outlive the Ignite containers
> and thus it will be possible to reuse them on restart.
>
> It's worth trying docker-compose, docker-swarm or kubernetes, depending on
> your needs.
> For example, Kubernetes provides a wide variety of volume options
> https://kubernetes.io/docs/concepts/storage/volumes/
>
>
> Has anyone use Ignite Native Persistence with Docker?
> Is there a solution on how to map the Volume dynamically? And how about
> when
> you restart the whole cluster, how does it maps all volumes?
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
>
>

Re: Ignite in docker (Native Persistence)

Posted by Denis Magda <dm...@apache.org>.
Nick,

As one of Ignite docker maintainers, could you please investigate one how to map Ignite persistence to docker volumes:
https://docs.docker.com/engine/admin/volumes/volumes/#use-a-read-only-volume <https://docs.docker.com/engine/admin/volumes/volumes/#use-a-read-only-volume>

and update the docker documentation:
https://apacheignite.readme.io/docs/docker-deployment <https://apacheignite.readme.io/docs/docker-deployment>

—
Denis

> On Dec 1, 2017, at 8:40 AM, afedotov <al...@gmail.com> wrote:
> 
> Hi,
> 
> You need to create volumes and map them to the ${IGNITE_HOME}/work/db or any
> other path that
> you might have specified via setPersistentStorePath. These volumes should
> outlive the Ignite containers
> and thus it will be possible to reuse them on restart.
> 
> It's worth trying docker-compose, docker-swarm or kubernetes, depending on
> your needs.
> For example, Kubernetes provides a wide variety of volume options
> https://kubernetes.io/docs/concepts/storage/volumes/
> 
> 
Has anyone use Ignite Native Persistence with Docker? 
Is there a solution on how to map the Volume dynamically? And how about when
you restart the whole cluster, how does it maps all volumes?
> 
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Ignite in docker (Native Persistence)

Posted by Denis Magda <dm...@apache.org>.
Nick,

As one of Ignite docker maintainers, could you please investigate one how to map Ignite persistence to docker volumes:
https://docs.docker.com/engine/admin/volumes/volumes/#use-a-read-only-volume <https://docs.docker.com/engine/admin/volumes/volumes/#use-a-read-only-volume>

and update the docker documentation:
https://apacheignite.readme.io/docs/docker-deployment <https://apacheignite.readme.io/docs/docker-deployment>

—
Denis

> On Dec 1, 2017, at 8:40 AM, afedotov <al...@gmail.com> wrote:
> 
> Hi,
> 
> You need to create volumes and map them to the ${IGNITE_HOME}/work/db or any
> other path that
> you might have specified via setPersistentStorePath. These volumes should
> outlive the Ignite containers
> and thus it will be possible to reuse them on restart.
> 
> It's worth trying docker-compose, docker-swarm or kubernetes, depending on
> your needs.
> For example, Kubernetes provides a wide variety of volume options
> https://kubernetes.io/docs/concepts/storage/volumes/
> 
> 
Has anyone use Ignite Native Persistence with Docker? 
Is there a solution on how to map the Volume dynamically? And how about when
you restart the whole cluster, how does it maps all volumes?
> 
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Ignite in docker (Native Persistence)

Posted by afedotov <al...@gmail.com>.
Hi,

You need to create volumes and map them to the ${IGNITE_HOME}/work/db or any
other path that
you might have specified via setPersistentStorePath. These volumes should
outlive the Ignite containers
and thus it will be possible to reuse them on restart.

It's worth trying docker-compose, docker-swarm or kubernetes, depending on
your needs.
For example, Kubernetes provides a wide variety of volume options
https://kubernetes.io/docs/concepts/storage/volumes/



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/