Here's a auto-generated Kubernetes replication controller json as of
now, for clarity. This could change based on the other testing.

{
    "kind": "ReplicationController",
    "id": "test2.php.domain",
    "apiVersion": "v1beta1",
    "labels": {
        "name": "test2.php.domain"
    },
    "desiredState": {
        "replicas": 2,
        "replicaSelector": {
            "name": "test2.php.domain"
        },
        "podTemplate": {
            "desiredState": {
                "manifest": {
                    "version": "v1beta1",
                    "id": "test2.php.domain",
                    "containers": [
                        {
                            "name": "test2-apachestratos-org",
                            "image": "sajhak/stratos-php",
                            "ports": [
                                {
                                    "name": "tcp80",
                                    "protocol": "tcp",
                                    "containerPort": 80,
                                    "hostPort": 0
                                },
                                {
                                    "name": "tcp443",
                                    "protocol": "tcp",
                                    "containerPort": 443,
                                    "hostPort": 0
                                }
                            ],
                            "env": [
                                {
                                    "name": "MEMBER_ID",
                                    "value":
"test2.php.domain9597d3fd-2852-49f5-af39-28ba9a6d2afa"
                                },
                                {
                                    "name": "LB_CLUSTER_ID"
                                },
                                {
                                    "name": "NETWORK_PARTITION_ID"
                                },
                                {
                                    "name": "KUBERNETES_CLUSTER_ID",
                                    "value": "KubGrp1"
                                },
                                {
                                    "name": "KUBERNETES_MASTER_IP",
                                    "value": "127.0.0.1"
                                },
                                {
                                    "name": "KUBERNETES_PORT_RANGE",
                                    "value": "4000-5000"
                                }
                            ]
                        }
                    ]
                },
                "replicas": 0
            },
            "labels": {
                "name": "test2.php.domain"
            }
        }
    }
}

On Fri, Sep 19, 2014 at 10:35 AM, Nirmal Fernando <[email protected]>
wrote:

> Here's the jsons and requests used.
>
> Register Host ClusterHost Json
>
> {
>
>      "groupId": "KubGrp1",
>
>      "description": "Kubernetes CoreOS cluster on EC2 ",
>
>      "kubernetesMaster": {
>
>                  "hostId" : "KubHostMaster1",
>
>                  "hostname" : "master.dev.kubernetes.example.org",
>
>                  "hostIpAddress" : "127.0.0.1",
>
>                  "property" : [
>
>                      {
>
>                     "name": "prop1",
>
>                     "value": "val1"
>
>                    },
>
>                      {
>
>                     "name": "prop2",
>
>                     "value": "val2"
>
>                    }
>
>                  ]
>
>        },
>
>        "portRange" : {
>
>           "upper": "5000",
>
>           "lower": "4000"
>
>        },
>
>        "kubernetesHost": [
>
>            {
>
>                     "hostId" : "KubHostSlave1",
>
>                     "hostname" : "slave1.dev.kubernetes.example.org",
>
>                     "hostIpAddress" : "127.0.0.1",
>
>                     "property" : [
>
>                         {
>
>                         "name": "prop1",
>
>                         "value": "val1"
>
>                       },
>
>                         {
>
>                         "name": "prop2",
>
>                         "value": "val2"
>
>                       }
>
>                     ]
>
>                }
>
>   ],
>
>   "property": [
>
>         {
>
>              "name": "prop1",
>
>              "value": "val1"
>
>         },
>
>         {
>
>              "name": "prop2",
>
>              "value": "val2"
>
>         }
>
>   ]
>
> }
>
> Register a Kubernetes Group
>
> curl -X POST -H "Content-Type: application/json" -d
> @"new-kub-register.json" -k  -u admin:admin "
> https://127.0.0.1:9443/stratos/admin/kubernetes/deploy/group";
>
> Get a registered Kubernetes Group
>
> curl  -k  -u admin:admin "
> https://127.0.0.1:9443/stratos/admin/kubernetes/group/KubGrp1";
>
>
> Deploy a Docker CartridgeDocker Cartridge Json
>
> {
>
>      "type": "php",
>
>      "provider": "apache",
>
>      "host": "apachestratos.org",
>
>      "displayName": "PHP",
>
>      "description": "PHP Cartridge",
>
>      "version": "5.0",
>
>      "multiTenant": "false",
>
>      "deployerType": "kubernetes",
>
>      "portMapping": [
>
>         {
>
>            "protocol": "http",
>
>            "port": "80",
>
>            "proxyPort": "8280"
>
>         },
>
>         {
>
>            "protocol": "https",
>
>            "port": "443",
>
>            "proxyPort": "8243"
>
>         }
>
>       ],
>
>       "container": [
>
>        {
>
>          "imageName": "sajhak/stratos-php",
>
>          "dockerfileRepo" :"
> https://github.com/sajhak/stratos-docker-php-image.git";,
>
>          "property": [
>
>            {
>
>             "name": "prop-name",
>
>             "value": "prop-value"
>
>            }
>
>          ]
>
>        }
>
>      ]
>
> }
>
> Deploy Docker Cartridge
>
> curl -X POST -H "Content-Type: application/json" -d
> @'php-docker-cart.json' -k -v -u admin:admin
> https://localhost:9443/stratos/admin/cartridge/definition
>
>
> Subscribe to a Docker Cartridge Subscription Json
>
> php-subscription.json
>
> {
>
>    "cartridgeType": "php",
>
>    "alias": "test2",
>
>    "commitsEnabled": "false",
>
>    "property": [
>
>            {
>
>             "name": "KUBERNETES_CLUSTER_ID",
>
>             "value": "KubGrp1"
>
>            },
>
>   {
>
>             "name": "KUBERNETES_REPLICAS_MIN",
>
>             "value": "2"
>
>            }
>
>          ]
>
> }
> Subscription Request
>
> curl -X POST -H "Content-Type: application/json" -d @php-subscription.json
> -k -v -u admin:admin
> https://localhost:9443/stratos/admin/cartridge/subscribe
>
>
> On Fri, Sep 19, 2014 at 10:11 AM, Nirmal Fernando <[email protected]>
> wrote:
>
>>
>>
>> On Fri, Sep 19, 2014 at 9:56 AM, Nirmal Fernando <[email protected]>
>> wrote:
>>
>>> Hi all,
>>>
>>> I've carried out following testing on the docker integration branch, so
>>> far, and here's the status.
>>>
>>> * Set up a local Kubernetes cluster (master and 2 minions) and tested
>>> basic Kubernetes operations on it.
>>> * Tested Kubernetes host registration and here I faced an issue when
>>> hosts getting persisted [1].
>>>
>>
>> I verified this again and this is fixed now.
>>
>>
>>> * Docker Cartridge deployment was tested and it worked fine.
>>> * Then tested the Docker Cartridge subscription and fixed few issues
>>> faced while doing so and committed them.
>>> * Upon a subscription a Kubernetes Cluster monitor got created and
>>> called CC to spawn containers.
>>> * Faced several class loading issues when I deployed kubernetes client
>>> jar built into the Carbon runtime due to the use of Jax-rs proxy APIs.
>>> Those were tricky to fix, hence re-wrote the client using Apache
>>> HttpClient.
>>> * Currently facing few issues with the hidden constraints of Kubernetes
>>> entities; such as;
>>>      - Container name can't have '.' (dots).
>>>      - Protocol of a container port should always be 'tcp'
>>>
>>> I'll continue the testing and update the thread.
>>>
>>> On Mon, Sep 15, 2014 at 9:11 AM, Nirmal Fernando <[email protected]
>>> > wrote:
>>>
>>>> Please take a moment to update the status of the tasks listed for 4.1.0
>>>> M1; http://goo.gl/vpdZIa
>>>>
>>>> Thanks.
>>>>
>>>> On Mon, Sep 15, 2014 at 8:58 AM, Nirmal Fernando <
>>>> [email protected]> wrote:
>>>>
>>>>> Currently hitting an issue in the docker-integration branch :
>>>>> https://issues.apache.org/jira/browse/STRATOS-798
>>>>>
>>>>> On Sun, Sep 14, 2014 at 11:12 PM, Nirmal Fernando <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Please avoid committing changes that are not available for M1. I am
>>>>>> gonna start an end-to-end testing.
>>>>>>
>>>>>> On Fri, Sep 12, 2014 at 10:23 AM, Nirmal Fernando <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> I create 4.1.0 M1 and M2 versions in the Jira. Please update the
>>>>>>> version of the Jiras you are planning to get to the first developer 
>>>>>>> preview
>>>>>>> as 4.1.0 M1.
>>>>>>>
>>>>>>> We need to come up with a code freeze date too. I'd suggest we code
>>>>>>> freeze for M1 on 13th September 8pm PST. Thoughts?
>>>>>>>
>>>>>>> On Wed, Sep 10, 2014 at 8:23 PM, Nirmal Fernando <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> I'll create a 4.1.0 M1 version, so that we can tag Jiras that
>>>>>>>> are/will be ready.
>>>>>>>>
>>>>>>>> On Wed, Sep 10, 2014 at 6:40 PM, Lakmal Warusawithana <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> If we are targeting this week for M1, what are the features can
>>>>>>>>> ship? JIRA list?
>>>>>>>>>
>>>>>>>>> On Wed, Sep 10, 2014 at 4:55 PM, Lakmal Warusawithana <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Dev,
>>>>>>>>>>
>>>>>>>>>> How about $subject? IMO, it will help all devs to check their
>>>>>>>>>> dependancies.
>>>>>>>>>>
>>>>>>>>>> thanks
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Lakmal Warusawithana
>>>>>>>>>> Vice President, Apache Stratos
>>>>>>>>>> Director - Cloud Architecture; WSO2 Inc.
>>>>>>>>>> Mobile : +94714289692
>>>>>>>>>> Blog : http://lakmalsview.blogspot.com/
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Lakmal Warusawithana
>>>>>>>>> Vice President, Apache Stratos
>>>>>>>>> Director - Cloud Architecture; WSO2 Inc.
>>>>>>>>> Mobile : +94714289692
>>>>>>>>> Blog : http://lakmalsview.blogspot.com/
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best Regards,
>>>>>>>> Nirmal
>>>>>>>>
>>>>>>>> Nirmal Fernando.
>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>
>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Nirmal
>>>>>>>
>>>>>>> Nirmal Fernando.
>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>
>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards,
>>>>>> Nirmal
>>>>>>
>>>>>> Nirmal Fernando.
>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>
>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Reply via email to