Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Run multiple environments on the same machine - TODO

root@obriensystemsu0:~/onap/oom/kubernetes/oneclick# ./createAll.bash -n onap -a robot

********** Creating instance 1 of ONAP with port range 30200 and 30399

********** Creating ONAP:

********** Creating deployments for robot **********

Creating namespace **********

namespace "onap-robot" created

Creating registry secret **********

secret "onap-docker-registry-key" created

Creating deployments and services **********

NAME:   onap-robot

LAST DEPLOYED: Sun Sep 17 14:58:29 2017

NAMESPACE: onap

STATUS: DEPLOYED

RESOURCES:

==> v1/Service

NAME   CLUSTER-IP  EXTERNAL-IP  PORT(S)       AGE

robot  10.43.6.5   <nodes>      88:30209/TCP  0s

==> extensions/v1beta1/Deployment

NAME   DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE

robot  1        1        1           0          0s

**** Done ****

root@obriensystemsu0:~/onap/oom/kubernetes/oneclick# ./createAll.bash -n onap2 -a robot

********** Creating instance 1 of ONAP with port range 30200 and 30399

********** Creating ONAP:

********** Creating deployments for robot **********

Creating namespace **********

namespace "onap2-robot" created

Creating registry secret **********

secret "onap2-docker-registry-key" created

Creating deployments and services **********

Error: release onap2-robot failed: Service "robot" is invalid: spec.ports[0].nodePort: Invalid value: 30209: provided port is already allocated

The command helm returned with error code 1

Rest API

There is a v1 and v2 experimental REST endpoint that allows us to automate Rancher

http://127.0.0.1:8880/v1

For example we can see when the AAI model-loader container was created

http://127.0.0.1:8880/v1/containerevents
{
  • "id": "1ce88",
  • "type": "containerEvent",
  • "links": {},
  • "actions": {},
  • "baseType": "containerEvent",
  • "state": "created",
  • "accountId": "1a7",
  • "created": "2017-09-17T20:07:37Z",
  • "createdTS": 1505678857000,
  • "data": {
    • "fields": {
      • "dockerInspect": {
        • "Id": "59ec11e257fb9061b250fe7ce6a7c86ffd10a82a2f26776c0adc9ac0eb3c6e54",
        • "Created": "2017-09-17T20:07:37.750772403Z",
        • "Path": "/pause",
        • "Args": [ ],
        • "State": {
          • "Status": "running",
          • "Running": true,
          • "Paused": false,
          • "Restarting": false,
          • "OOMKilled": false,
          • "Dead": false,
          • "Pid": 25115,
          • "ExitCode": 0,
          • "Error": "",
          • "StartedAt": "2017-09-17T20:07:37.92889179Z",
          • "FinishedAt": "0001-01-01T00:00:00Z"
          },
        • "Image": "sha256:99e59f495ffaa222bfeb67580213e8c28c1e885f1d245ab2bbe3b1b1ec3bd0b2",
        • "ResolvConfPath": "/var/lib/docker/containers/59ec11e257fb9061b250fe7ce6a7c86ffd10a82a2f26776c0adc9ac0eb3c6e54/resolv.conf",
        • "HostnamePath": "/var/lib/docker/containers/59ec11e257fb9061b250fe7ce6a7c86ffd10a82a2f26776c0adc9ac0eb3c6e54/hostname",
        • "HostsPath": "/var/lib/docker/containers/59ec11e257fb9061b250fe7ce6a7c86ffd10a82a2f26776c0adc9ac0eb3c6e54/hosts",
        • "LogPath": "/var/lib/docker/containers/59ec11e257fb9061b250fe7ce6a7c86ffd10a82a2f26776c0adc9ac0eb3c6e54/59ec11e257fb9061b250fe7ce6a7c86ffd10a82a2f26776c0adc9ac0eb3c6e54-json.log",
        • "Name": "/k8s_POD_model-loader-service-849987455-532vd_onap-aai_d9034afb-9be3-11e7-ac87-024d93e255bc_0",
        • "RestartCount": 0,
        • "Driver": "aufs",
        • "MountLabel": "",
        • "ProcessLabel": "",
        • "AppArmorProfile": "",
        • "ExecIDs": null,
        • "HostConfig": {
          • "Binds": null,
          • "ContainerIDFile": "",
          • "LogConfig": {
            • "Type": "json-file",
            • "Config": { }
            },
          • "NetworkMode": "none",
          • "PortBindings": { },
          • "RestartPolicy": {
            • "Name": "",
            • "MaximumRetryCount": 0
            },
          • "AutoRemove": false,
          • "VolumeDriver": "",
          • "VolumesFrom": null,
          • "CapAdd": null,
          • "CapDrop": null,
          • "Dns": null,
          • "DnsOptions": null,
          • "DnsSearch": null,
          • "ExtraHosts": null,
          • "GroupAdd": null,
          • "IpcMode": "",
          • "Cgroup": "",
          • "Links": null,
          • "OomScoreAdj": -998,
          • "PidMode": "",
          • "Privileged": false,
          • "PublishAllPorts": false,
          • "ReadonlyRootfs": false,
          • "SecurityOpt": [
            • "seccomp=unconfined"
            ],
          • "UTSMode": "",
          • "UsernsMode": "",
          • "ShmSize": 67108864,
          • "Runtime": "runc",
          • "ConsoleSize": [ 2 items
            • 0,
            • 0
            ],
          • "Isolation": "",
          • "CpuShares": 2,
          • "Memory": 0,
          • "CgroupParent": "/kubepods/besteffort/podd9034afb-9be3-11e7-ac87-024d93e255bc",
          • "BlkioWeight": 0,
          • "BlkioWeightDevice": null,
          • "BlkioDeviceReadBps": null,
          • "BlkioDeviceWriteBps": null,
          • "BlkioDeviceReadIOps": null,
          • "BlkioDeviceWriteIOps": null,
          • "CpuPeriod": 0,
          • "CpuQuota": 0,
          • "CpuRealtimePeriod": 0,
          • "CpuRealtimeRuntime": 0,
          • "CpusetCpus": "",
          • "CpusetMems": "",
          • "Devices": null,
          • "DiskQuota": 0,
          • "KernelMemory": 0,
          • "MemoryReservation": 0,
          • "MemorySwap": 0,
          • "MemorySwappiness": -1,
          • "OomKillDisable": false,
          • "PidsLimit": 0,
          • "Ulimits": null,
          • "CpuCount": 0,
          • "CpuPercent": 0,
          • "IOMaximumIOps": 0,
          • "IOMaximumBandwidth": 0
          },
        • "GraphDriver": {
          • "Name": "aufs",
          • "Data": null
          },
        • "Mounts": [ ],
        • "Config": {
          • "Hostname": "model-loader-service-849987455-532vd",
          • "Domainname": "",
          • "User": "",
          • "AttachStdin": false,
          • "AttachStdout": false,
          • "AttachStderr": false,
          • "Tty": false,
          • "OpenStdin": false,
          • "StdinOnce": false,
          • "Env": null,
          • "Cmd": null,
          • "Image": "gcr.io/google_containers/pause-amd64:3.0",
          • "Volumes": null,
          • "WorkingDir": "",
          • "Entrypoint": [
            • "/pause"
            ],
          • "OnBuild": null,
          • "Labels": {}
          },
        • "NetworkSettings": {
          • "Bridge": "",
          • "SandboxID": "6ebd4ae330d1fded82301d121e604a1e7193f20c538a9ff1179e98b9e36ffa5f",
          • "HairpinMode": false,
          • "LinkLocalIPv6Address": "",
          • "LinkLocalIPv6PrefixLen": 0,
          • "Ports": { },
          • "SandboxKey": "/var/run/docker/netns/6ebd4ae330d1",
          • "SecondaryIPAddresses": null,
          • "SecondaryIPv6Addresses": null,
          • "EndpointID": "",
          • "Gateway": "",
          • "GlobalIPv6Address": "",
          • "GlobalIPv6PrefixLen": 0,
          • "IPAddress": "",
          • "IPPrefixLen": 0,
          • "IPv6Gateway": "",
          • "MacAddress": "",
          • "Networks": {
            • "none": {
              • "IPAMConfig": null,
              • "Links": null,
              • "Aliases": null,
              • "NetworkID": "9812f79a4ddb086db1b60cd10292d729842b2b42e674b400ac09101541e2b845",
              • "EndpointID": "d4cb711ea75ed4d27b9d4b3a71d1b3dd5dfa9f4ebe277ab4280d98011a35b463",
              • "Gateway": "",
              • "IPAddress": "",
              • "IPPrefixLen": 0,
              • "IPv6Gateway": "",
              • "GlobalIPv6Address": "",
              • "GlobalIPv6PrefixLen": 0,
              • "MacAddress": ""
              }
            }
          }
        }
      }
    },


Troubleshooting

Rancher fails to restart on server reboot

...