Deploying a component

This document is a step-by-step guide to help you understand how the Integrations platform works, and the steps necessary to get a simple component pushed and ready for a successful integration.

Upload your SSH key

  1. The first step is to upload your SSH key to authorize your deployment through the git-push process.

Failure to provide (upload) a unique SSH key would result in a Permission denied error during the git push phase.

Clone and prepare your component

If you have prepared your component locally by following instructions in the how to build a component documentation, you can skip this step. Otherwise, you can clone one of your template repositories to go through these steps multiple times to familiarize yourself.

At the moment, Node.js and Java are supported, so here are component templates in each language respectively:

For example, in the case of Node.js, the process would be:

  1. Clone the repository:

    $ git clone https://github.com/elasticio/petstore-component-nodejs
    Cloning into 'petstore-component-nodejs'...
    remote: Counting objects: 130, done.
    remote: Compressing objects: 100% (9/9), done.
    remote: Total 130 (delta 3), reused 0 (delta 0), pack-reused 121
    Receiving objects: 100% (130/130), 43.40 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (60/60), done.
  2. Check the local directory and file structure:

    $ cd  petstore-component-nodejs/
    $ ls -ga
    total 64
    drwxr-xr-x  10 staff    340 Mar  nine 17:08 .
    drwxr-xr-x  12 staff    408 Mar  nine 17:08 ..
    drwxr-xr-x  13 staff    442 Mar  nine 17:08 .git
    -rw-r--r--   one staff    526 Mar  nine 17:08 .gitignore
    -rw-r--r--   one staff   2703 Mar  nine 17:08 README.md
    -rw-r--r--   one staff   2808 Mar  nine 17:08 component.json
    drwxr-xr-x   five staff    170 Mar  nine 17:08 lib
    -rw-r--r--   one staff  11543 Mar  nine 17:08 logo.png
    -rw-r--r--   one staff    621 Mar  nine 17:08 package.json
    -rw-r--r--   one staff   1005 Mar  nine 17:08 verifyCredentials.js

    Read the Building a component in Node.js documentation for more information.

Prepare the remote repository

  1. Run the following command to know which repositories you can access:

    $ git remote -v
    origin https://github.com/elasticio/petstore-component-nodejs (fetch)
    origin https://github.com/elasticio/petstore-component-nodejs (push)

    You need to add a new repository to your platform by following the instructions on the Managing your teams and components page.

    For simplicity, this documentation will use the same name for the repository creation petstore-component-nodejs and assume you have created this particular repository in the development team called dev-build.

    The platform would create a specific git repository like this:
    dev-build@git.elastic.io:petstore-component-nodejs.git.

  1. Then you add this repository to your local git configuration of the local repository like this:

    $ git remote add ipaas dev-build@git.elastic.io:petstore-component-nodejs.git
    $ git remote -v
    ipaas dev-build@git.elastic.io:petstore-component-nodejs.git (fetch)
    ipaas dev-build@git.elastic.io:petstore-component-nodejs.git (push)
    origin https://github.com/elasticio/petstore-component-nodejs (fetch)
    origin https://github.com/elasticio/petstore-component-nodejs (push)

    your repository is ready to receive the petstore-component-nodejs component.

Push your component

After performing all the tasks described above, you are ready to push your code to the newly created repository.

Enter the command:

$ git push ipaas master

Before your push succeeds, the system will authenticate your SSH Key, which you have created specifically for this. Please type yes and accept it to proceed.

Use the component

When you start creating your integration flow, the newly added component is in the list of components.

If your component has only an action function, then your component would show when selecting an action function while building the integration flow.

If your component has only a trigger function, then your component would show when selecting a trigger component.