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 <dhar...@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 Павлухин Иван <vololo...@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.metang...@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.

Reply via email to