Global Data Management Forum

 View Only
Expand all | Collapse all

Db2 is Developer-inclusive

  • 1.  Db2 is Developer-inclusive

    Community Leadership
    Posted Wed October 28, 2020 07:20 PM
    Edited by System Fri January 20, 2023 04:16 PM

    This webinar details how enterprises can become smarter with a data management system that is developer-inclusive. During this session, participants will get to learn how Db2 integrates with a broad array of programming languages, employs in-database machine learning, and leverages REST APIs to accelerate application development.

    This webinar will also delve into the the latest release of Db2 and upcoming features of Db2 11.5.5

    Please join @Tanmay Sinha
    ​, @VINAYAK AGRAWAL, @MARYIA RAKINA and @Dan Snoddy in this on demand webinar which you can watch here.

    Share your questions below. 

    Thanks,
    ​​​



    ------------------------------
    Doug Moran
    ------------------------------
    #DataManagementGlobal


  • 2.  RE: Db2 is Developer-inclusive

    Posted Fri November 06, 2020 06:01 PM
    Edited by System Fri January 20, 2023 04:19 PM
    Hello everyone, 

    In correspondence to our upcoming webinar on  Wednesday at 11 AM, I want to share this Db2 code pattern, Order processing during pandemics for offline mode.

    This code pattern explains how to build an AI-powered back-end system that can take your daily essential orders through an offline mode.

    Get the code here 



    I hope you can join @Tanmay Sinha, @VINAYAK AGRAWAL, @MARYIA RAKINA and @Dan Snoddy this Wednesday at 11 AM for their Db2 is Developer-inclusive webinar. Register to watch here and post any of your questions below. 

    Thanks, ​​​



    ------------------------------
    Kip Yego
    ------------------------------



  • 3.  RE: Db2 is Developer-inclusive

    Posted Wed November 11, 2020 11:18 AM
    Hello everyone, 
    You can watch the on demand recording here and download the slides here



    Please share any of your questions below. 

    Thanks,

    ------------------------------
    MARYIA RAKINA
    Offering Manager
    IBM
    ------------------------------



  • 4.  RE: Db2 is Developer-inclusive

    Posted Tue November 17, 2020 01:49 PM
    The webinar was very good, thank you. I am struggling to find how to install the Rest API system for my on premise db2 install

    ------------------------------
    Wannes Rams
    Director
    Ramsit
    ------------------------------



  • 5.  RE: Db2 is Developer-inclusive

    Posted Tue November 17, 2020 02:10 PM
    Hi Wannes,

    You need to download the REST container, it's not part of the Db2 install. You can find detailed instructions here: https://www.ibm.com/support/producthub/db2/docs/content/SSEPGG_11.5.0/com.ibm.db2.luw.admin.rest.doc/doc/c_rest.html

    ------------------------------
    MARYIA RAKINA
    Offering Manager
    IBM
    ------------------------------



  • 6.  RE: Db2 is Developer-inclusive

    Posted Wed November 18, 2020 09:12 AM
    Hi Maryia, thank you for the fast reply and info. I had already found that link, but could not get it to work. I followed steps until activating and initializing but the 50050 port to access the service is not available.

    ------------------------------
    Wannes Rams
    Director
    Ramsit
    ------------------------------



  • 7.  RE: Db2 is Developer-inclusive

    Posted Wed November 18, 2020 02:26 PM
    Which step are you on? 

    If you run: docker exec containername /opt/ibm/dbrest/scripts/db2rest-status.sh you can see whether the server is running.


    ------------------------------
    Dan Snoddy
    ------------------------------



  • 8.  RE: Db2 is Developer-inclusive

    Posted Wed November 18, 2020 02:26 PM
    Hi Wannes, can you clarify which step you are on where 50050 isn't available -- that is, did you run the setup script, have you started the server, etc? Is 50050 already in use?

    ------------------------------
    Dan Snoddy
    ------------------------------



  • 9.  RE: Db2 is Developer-inclusive

    Posted Thu November 19, 2020 08:34 AM
    Hey Dan, thanks for picking this up. Service is running, I am getting "SERVER STATUS: ACTIVE" from the status script
    I am running this locally in docker desktop and a docker ps reveals there are no ports exposed

    CONTAINER ID        IMAGE                                 COMMAND                  CREATED              STATUS              PORTS               NAMES

    857d494d9a76        icr.io/obs/hdm/db2rest:latest-amd64   "/opt/ibm/dbrest/res…"   About a minute ago   Up About a minute                       db2rest

    Just downloaded the latest release as well and deleted the container, recreated it and ran through the setup again. 

    docker run -it --net=host -e LICENSE=view -e DB2REST_USE_HTTP=true --name=db2rest icr.io/obs/hdm/db2rest:latest-amd64
    Is what I used

    Docker inspect gives me the following

    [

        {

            "Id": "857d494d9a762c86bb116caa69abaa393a3d40f42c8a2e4aa2744a21994c7e50",

            "Created": "2020-11-19T13:21:10.9299778Z",

            "Path": "/opt/ibm/dbrest/rest_entrypoint.sh",

            "Args": [],

            "State": {

                "Status": "running",

                "Running": true,

                "Paused": false,

                "Restarting": false,

                "OOMKilled": false,

                "Dead": false,

                "Pid": 58671,

                "ExitCode": 0,

                "Error": "",

                "StartedAt": "2020-11-19T13:21:11.1109423Z",

                "FinishedAt": "0001-01-01T00:00:00Z"

            },

            "Image": "sha256:ecd2e1b0ffd29873cc2d6b3ea6ab9692350349adfda25a37ba9801565e7c8df9",

            "ResolvConfPath": "/var/lib/docker/containers/857d494d9a762c86bb116caa69abaa393a3d40f42c8a2e4aa2744a21994c7e50/resolv.conf",

            "HostnamePath": "/var/lib/docker/containers/857d494d9a762c86bb116caa69abaa393a3d40f42c8a2e4aa2744a21994c7e50/hostname",

            "HostsPath": "/var/lib/docker/containers/857d494d9a762c86bb116caa69abaa393a3d40f42c8a2e4aa2744a21994c7e50/hosts",

            "LogPath": "/var/lib/docker/containers/857d494d9a762c86bb116caa69abaa393a3d40f42c8a2e4aa2744a21994c7e50/857d494d9a762c86bb116caa69abaa393a3d40f42c8a2e4aa2744a21994c7e50-json.log",

            "Name": "/db2rest",

            "RestartCount": 0,

            "Driver": "overlay2",

            "Platform": "linux",

            "MountLabel": "",

            "ProcessLabel": "",

            "AppArmorProfile": "",

            "ExecIDs": null,

            "HostConfig": {

                "Binds": null,

                "ContainerIDFile": "",

                "LogConfig": {

                    "Type": "json-file",

                    "Config": {}

                },

                "NetworkMode": "host",

                "PortBindings": {},

                "RestartPolicy": {

                    "Name": "no",

                    "MaximumRetryCount": 0

                },

                "AutoRemove": false,

                "VolumeDriver": "",

                "VolumesFrom": null,

                "CapAdd": null,

                "CapDrop": null,

                "Capabilities": null,

                "Dns": [],

                "DnsOptions": [],

                "DnsSearch": [],

                "ExtraHosts": null,

                "GroupAdd": null,

                "IpcMode": "private",

                "Cgroup": "",

                "Links": null,

                "OomScoreAdj": 0,

                "PidMode": "",

                "Privileged": false,

                "PublishAllPorts": false,

                "ReadonlyRootfs": false,

                "SecurityOpt": null,

                "UTSMode": "",

                "UsernsMode": "",

                "ShmSize": 67108864,

                "Runtime": "runc",

                "ConsoleSize": [

                    0,

                    0

                ],

                "Isolation": "",

                "CpuShares": 0,

                "Memory": 0,

                "NanoCpus": 0,

                "CgroupParent": "",

                "BlkioWeight": 0,

                "BlkioWeightDevice": [],

                "BlkioDeviceReadBps": null,

                "BlkioDeviceWriteBps": null,

                "BlkioDeviceReadIOps": null,

                "BlkioDeviceWriteIOps": null,

                "CpuPeriod": 0,

                "CpuQuota": 0,

                "CpuRealtimePeriod": 0,

                "CpuRealtimeRuntime": 0,

                "CpusetCpus": "",

                "CpusetMems": "",

                "Devices": [],

                "DeviceCgroupRules": null,

                "DeviceRequests": null,

                "KernelMemory": 0,

                "KernelMemoryTCP": 0,

                "MemoryReservation": 0,

                "MemorySwap": 0,

                "MemorySwappiness": null,

                "OomKillDisable": false,

                "PidsLimit": null,

                "Ulimits": null,

                "CpuCount": 0,

                "CpuPercent": 0,

                "IOMaximumIOps": 0,

                "IOMaximumBandwidth": 0,

                "MaskedPaths": [

                    "/proc/asound",

                    "/proc/acpi",

                    "/proc/kcore",

                    "/proc/keys",

                    "/proc/latency_stats",

                    "/proc/timer_list",

                    "/proc/timer_stats",

                    "/proc/sched_debug",

                    "/proc/scsi",

                    "/sys/firmware"

                ],

                "ReadonlyPaths": [

                    "/proc/bus",

                    "/proc/fs",

                    "/proc/irq",

                    "/proc/sys",

                    "/proc/sysrq-trigger"

                ]

            },

            "GraphDriver": {

                "Data": {

                    "LowerDir": "/var/lib/docker/overlay2/0ac4705533bd49b70dae57cacb3d5ee814afeedd024b0917e87f85216deb66e1-init/diff:/var/lib/docker/overlay2/07badc19325a9389510af28e95d264b8eb12832f0f4c892e36c2823a09f34d0a/diff:/var/lib/docker/overlay2/55c1cb1566f67ea7994074b6431f46cfbe3473df6b0be845bfc4fef56eec70fa/diff:/var/lib/docker/overlay2/3eb8f287d8b3b20ba2f10c86a0a8a4bc4a202c8ef0fbb26763675e5f528e87f5/diff:/var/lib/docker/overlay2/a201722a738f7352e13fe519518f048ac08391a282f9b4b46ec56013f120653b/diff:/var/lib/docker/overlay2/f6db99557ac28c4df9a51ee4ead5e96953abfbb906b805f50487fc925ce84f0a/diff:/var/lib/docker/overlay2/a50a4b5e704b4d8559a3c955c7be50fd02acf3e3870e8fc2574ecbec70350fec/diff:/var/lib/docker/overlay2/4204fad6a594a3c6f1845e0d28c0354f707f37aa2504ad3582d7c63138e3e421/diff:/var/lib/docker/overlay2/3bfbebeb9a7dd2246eb221bfd01239a8e191018140296c24e956a4d446d1e281/diff:/var/lib/docker/overlay2/4379c242fbfeaf2c40237f24c26b2fb7fb42fb8c1bb7f15c6ee42af9df3c2c37/diff",

                    "MergedDir": "/var/lib/docker/overlay2/0ac4705533bd49b70dae57cacb3d5ee814afeedd024b0917e87f85216deb66e1/merged",

                    "UpperDir": "/var/lib/docker/overlay2/0ac4705533bd49b70dae57cacb3d5ee814afeedd024b0917e87f85216deb66e1/diff",

                    "WorkDir": "/var/lib/docker/overlay2/0ac4705533bd49b70dae57cacb3d5ee814afeedd024b0917e87f85216deb66e1/work"

                },

                "Name": "overlay2"

            },

            "Mounts": [],

            "Config": {

                "Hostname": "docker-desktop",

                "Domainname": "",

                "User": "dbrest",

                "AttachStdin": true,

                "AttachStdout": true,

                "AttachStderr": true,

                "Tty": true,

                "OpenStdin": true,

                "StdinOnce": true,

                "Env": [

                    "DB2REST_USE_HTTP=true",

                    "LICENSE=view",

                    "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",

                    "container=oci",

                    "SETUP_AREA=/setup",

                    "BASE_DIR=/opt/ibm",

                    "CLIENT_DIR=/opt/ibm/clidriver",

                    "DB2REST_INSTALL_PATH=/opt/ibm/dbrest"

                ],

                "Cmd": null,

                "Image": "icr.io/obs/hdm/db2rest:latest-amd64",

                "Volumes": null,

                "WorkingDir": "/opt/ibm/dbrest",

                "Entrypoint": [

                    "/opt/ibm/dbrest/rest_entrypoint.sh"

                ],

                "OnBuild": null,

                "Labels": {

                    "architecture": "x86_64",

                    "build-date": "2020-08-03T09:26:37.539949",

                    "com.redhat.build-host": "cpt-1006.osbs.prod.upshift.rdu2.redhat.com",

                    "com.redhat.component": "ubi7-minimal-container",

                    "com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI",

                    "description": "This image contains the Db2 REST services container",

                    "distribution-scope": "public",

                    "io.k8s.description": "The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.",

                    "io.k8s.display-name": "Red Hat Universal Base Image 7 Minimal",

                    "io.openshift.tags": "minimal rhel7",

                    "maintainer": "Red Hat, Inc.",

                    "name": "REST Services for Db2",

                    "release": "366",

                    "summary": "REST Services for Db2",

                    "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/ubi7-minimal/images/7.8-366",

                    "vcs-ref": "7263b15a2f6151db6f3d525070ebb19a683b3182",

                    "vcs-type": "git",

                    "vendor": "IBM",

                    "version": "7.8"

                }

            },

            "NetworkSettings": {

                "Bridge": "",

                "SandboxID": "1d76c2a72478664b0577e852afa3164f2bf178b82743215d14cc4b3ffabfb544",

                "HairpinMode": false,

                "LinkLocalIPv6Address": "",

                "LinkLocalIPv6PrefixLen": 0,

                "Ports": {},

                "SandboxKey": "/var/run/docker/netns/default",

                "SecondaryIPAddresses": null,

                "SecondaryIPv6Addresses": null,

                "EndpointID": "",

                "Gateway": "",

                "GlobalIPv6Address": "",

                "GlobalIPv6PrefixLen": 0,

                "IPAddress": "",

                "IPPrefixLen": 0,

                "IPv6Gateway": "",

                "MacAddress": "",

                "Networks": {

                    "host": {

                        "IPAMConfig": null,

                        "Links": null,

                        "Aliases": null,

                        "NetworkID": "cf00410e8f5e34811ff392514f6ed3343f2535a9768866332a4ac084e1fb0ace",

                        "EndpointID": "66d4818aaa9809d53851a1da2ceb1da503eeeb780b36991f3bc523143913c2a0",

                        "Gateway": "",

                        "IPAddress": "",

                        "IPPrefixLen": 0,

                        "IPv6Gateway": "",

                        "GlobalIPv6Address": "",

                        "GlobalIPv6PrefixLen": 0,

                        "MacAddress": "",

                        "DriverOpts": null

                    }

                }

            }

        }

    ]



    I would have expected a port binding for 50050

    ------------------------------
    Wannes Rams
    Director
    Ramsit
    ------------------------------



  • 10.  RE: Db2 is Developer-inclusive

    Posted Thu November 19, 2020 09:40 AM

    Docker has lots of networking options, so rather than using --net, you can deploy it this way:

    docker stop db2rest

    docker rm db2rest

    docker run -it -p 50050:50050 -e LICENSE=view -e DB2REST_USE_HTTP=true --name=db2rest icr.io/obs/hdm/db2rest:latest-amd64



    ------------------------------
    Dan Snoddy
    ------------------------------



  • 11.  RE: Db2 is Developer-inclusive

    Posted Fri November 20, 2020 04:27 AM
    Hi Dan, Thank you that worked, I did try before but forgot to remove the --net option
    Should the doc be updated?
    https://www.ibm.com/support/producthub/db2/docs/content/SSEPGG_11.5.0/com.ibm.db2.luw.admin.rest.doc/doc/t_download_rest.html

    ------------------------------
    Wannes Rams
    Director
    Ramsit
    ------------------------------



  • 12.  RE: Db2 is Developer-inclusive

    Posted Tue November 24, 2020 10:54 AM
    So @Dan Snoddy and @MARYIA RAKINA where can I find more documentation on this container. I have some questions on how to deploy this in a production environment.
    - Clustering
    - Connecting to more than 1 backend database
    - Best practices on security​​

    Is there a place where I can find answers?

    ------------------------------
    Wannes Rams
    Director
    Ramsit
    ------------------------------



  • 13.  RE: Db2 is Developer-inclusive

    Posted Wed November 18, 2020 02:27 PM
    My field of study is DevOps Engineer; not developer. Please don’t send me any developer information. Also, I’m on CST. If you send me links to Webinars that aren’t on CST, please send me a link with the archived version. Thanks!


    Yvonne

    Sent from my iPhone