Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 

Overview






Eclipse Dirigible is an open-source cloud development platform that provides capabilities for end-to-end development processes from database modeling and management, through RESTful services using server-side JavaScript, to pattern-based user interface generation, role-based security, external services integration, testing, debugging, operations and monitoring.

Some of the unique features include:

The platform aims to unify open-source business services by providing software developers with a convenient set of tools for building, running, and operating business applications in the Cloud. Dirigible is also part of the Eclipse Cloud Development top-level project.

Setup






Starting with Eclipse Dirigible 5.0, there are built-in integrations with the SAP Cloud Platform Cloud Foundry and Kyma environments. To deploy Eclipse Dirigible on either one of these environments, you need to use a Docker image. While deploying the publicly available Dirigible Docker images is quite straightforward, there could be some cases where you might need to deploy a Docker image form a private Docker repository instead. Here are some of the cases:

  • Creating a proprietary extension to the Dirigible Web IDE

  • Using a new engine that supports custom Dirigible Runtime artifacts

  • Deploying an application developed with Dirigible on production


In any of these cases, building a Docker image and pushing it to a private Docker repository, seems reasonable.

In this tutorial, I'm going to show you how to deploy an Eclipse Dirigible based Docker image from a private Docker repository. During the tutorial I'm going to use the Docker Hub "one private" repository policy from the "Free for Individuals" plan.

As a prerequisite, you need a Docker Hub registration. If you already have a Docker Hub registration, or you are going to use another private Docker repository, then skip this section.

  1. Go to https://hub.docker.com

  2. Create a new registration.

  3. Log on to your account.


(Docker Hub)


Next, we are going to create a new Private repository:

  1. Go to the Repositories tab.

  2. Click the Create Repository button.

  3. Name the repository (e.g. my-repository).

  4. Add a repository description (this is optional).

  5. Switch the visibility from Public to Private.

  6. Create the repository.



(Creating a new Docker Hub repository)


Once the private Docker repository is created, then it's time to push the Docker image to it:

  1. Build your Docker image:
    docker build -t my-repository .


  2. Tag the Docker image:
    docker tag my-repository <your-docker-hub-user>/my-repository​


  3. Push the image to the private Docker repository:
    docker push <your-docker-hub-user>/my-repository​


  4. Check if the Docker image was successfully pushed:



(Docker Image Tags)


Now it's time to log on to the SAP Cloud Platform Cloud Foundry environment subaccount from the Cloud Foundry CLI:

  1. Install the Cloud Foundry CLI. You can either get the latest release from the official release page or use your package manager.

  2. Log on to the SAP Cloud Platform Cockpit and copy the Org Name and the API Endpoint:

  3. Set the Cloud Foundry CLI API endpoint:
    cf api https://api.cf.eu10.hana.ondemand.com​


  4. Log on to your subaccount:
    cf login​



The next step is to deploy the Docker image in the SAP Cloud Platform Cloud Foundry environment via the Cloud Foundry CLI:

  1. Execute the cf push command to create a new application:
    CF_DOCKER_PASSWORD=<docker-hub-password> \
    cf push <application-name> \
    --docker-image=<docker-hub-username>/my-repository \
    --docker-username=<docker-hub-username> \
    --hostname <application-name>-<org-name> \
    -m 2G -k 2G​


    • <docker-hub-password> - your Docker Hub password

    • <application-name> - the application name

    • <docker-hub-username> - your Docker Hub username

    • <org-name> - the Org Name from the SAP Cloud Platform Cockpit



  2. Bind an Authorization & Trust Management (XSUAA) service instance to the application:

    1. Navigate to your subaccount from the SAP Cloud Platform Cockpit.

    2. Create a new service instance (if you already have one, skip this step):

      1. Go to Services -> Service Marketplace.

      2. Search for the Authorization & Trust Management service.

      3. Click the Create Instance button.

      4. Set the Service Plan to application.

      5. Name the service instance (e.g. my-xsuaa).

      6. Go to the Next page.

      7. Provide a JSON configuration for the service instance like this one:
        {
        "xsappname": "my-xsuaa",
        "tenant-mode": "shared",
        "scopes": [
        {
        "name": "$XSAPPNAME.Developer",
        "description": "Developer scope"
        },
        {
        "name": "$XSAPPNAME.Operator",
        "description": "Operator scope"
        }
        ],
        "role-templates": [
        {
        "name": "Developer",
        "description": "Developer related roles",
        "scope-references": [
        "$XSAPPNAME.Developer"
        ]
        },
        {
        "name": "Operator",
        "description": "Operator related roles",
        "scope-references": [
        "$XSAPPNAME.Operator"
        ]
        }
        ],
        "role-collections": [
        {
        "name": "dirigible",
        "description": "Dirigible Developer",
        "role-template-references": [
        "$XSAPPNAME.Developer",
        "$XSAPPNAME.Operator"
        ]
        }
        ]
        }


      8. Click the Create Instance button.



    3. Bind the XSUAA service instance to your application:

      1. Go to the Services -> Service Instances tab.

      2. Select your XSUAA service instance (e.g. my-xsuaa).

      3. From the "More" option, select Bind Application.

      4. Find your application and click the Create button.



    4. Assign the required roles:

      1. Go to Security -> Trust Configuration.

      2. Open the trust configuration (e.g. sap.default).

      3. Find for your user ID and assign the required roles.



    5. For more detailed explanation of the service binding process and the trust configuration steps, visit this blog post.



  3. Bind any additional services, if needed.

    1. You can refer to the following blog post on binding the PostgreSQL service.



  4. Restart the application.

  5. Access the application:


Related Resources







Notes






Next, you can visit the Samples section to master some of the basic Eclipse Dirigible functionalities, explore the Enterprise JavaScript APIs, check out the YouTube channel for video content, or simply visit the official site for news and updates.