Skip to main content

Manage Application in Local

Project Mode (Git Based Application)

After setting up igniteconnex application locally, now you can manage your application. Following are the steps-

Creating your first project

When you open the Editor, you’ll be greeted by a welcome screen that invites you to create your first project using your existing flow files.

It will take you through the following steps-

Step 1: Setup your version control client

IgniteConnex uses the open source tool Git for version control. It tracks changes to your project files and lets you push them to remote repositories.

When you commit a set of changes, Git records who made the changes with a username and email address. The Username can be anything you want - it does not need to be your real name.

You can change these settings at any time via the main settings dialog.

Step 2: Create your project

The next step lets you name your project and given it a description.

Step 3: Create your project files

IgniteConnex will automatically migrate your existing flow files into your project. You can choose to rename them here if you want.

Step 4: Setup encryption of your credentials file

As you may choose to share your project on public sites such as GitHub.

Note

It is strongly recommended that you encrypt your credentials file.

To encrypt it, you need to choose a key that will be used to secure the file. This key is not stored within the project. If someone else clones your project, you will need to provide them the key to decrypt the credentials file. Otherwise they will need to edit the flow to provide their own credentials.

Working with projects

Once you have created your project, you can continue to use the editor just as you always have. There are some new parts of the editor that have been added to work with your project-

Accessing Project Settings

The Info sidebar now shows what project you are working on at the top. Next to the project name is a button that opens up the Project Settings dialog.

The dialog has three tabs-

Lets you edit the project’s README.md file.

You can also access this from the Projects -> Project Settings option in the main menu.

  • Project Dependencies

Each project has its own package.json file that includes a list of node modules the project depends on. The editor tracks what nodes you are using in a flow and helps you to keep that list of dependencies up to date.

Keeping the dependency list up to date is important if you want to share the project with others - as it will help users to install the necessary modules.

  • Project Settings

The project settings tab lets you manage your flow files, the encryption configuration of your credentials and configure your local git branches and remote repositories.

  • Version Control

A new history tab has been added to the sidebar. This is where you manage the version control of your project.

The tab has two sections:

Shows project files that have changed, allowing you to stage and commit them.

Whenever you change a project file, such as by deploying a new flow configuration, it will be listed in the ‘Local files’ section. You can click on the file name to see a diff of what has changed. When you hover over the file, you’ll see a + button - clicking that will stage the file - moving it down to the ‘Changes to commit’ list.

When you have staged the files you want to commit, click the commit button, enter a message and confirm.

Creating new projects

After you have created your first project by migrating your existing flow files you can create additional projects.

Selecting Projects -> New from the menu opens the Projects dialog.

This provides three options-

  • Open an existing project

  • Create a new project

  • Clone a project repository

  • Open an existing project

Runtime only runs one project at any time. By opening another project, you change what flows are running.

The ‘Open project’ view also allows you to delete projects by hovering over them in the list and clicking the delete button. You cannot delete the active project.

  • Create a new project

This lets you create a new project. It provides the same options as the ‘Create your first project’ set of screens, but collapsed into one.

  • Clone a project repository

This lets you clone an existing remote repository. You can use either an http(s) or git/ssh URL for the repository. If the repository requires authentication you must provide it here.

Note

For http URLs, do not include your username and/or password in the URL itself. You can should provide those separately when prompted.

Build Image

The IgniteConnex Application runs on docker container, you can build image from project repository.

  1. Open Terminal

  2. Clone your git repository

  3. Create a Docker file. See, Appendix Build for reference or Sample Dockerfile

  4. Run the following command:

    docker build . -t your-image-name

Docker image can be pushed to public/private repository like https://hub.docker.com/

Deployment (Start Application)

To start application, follow following command.

  1. Open Terminal

  2. Run the following command:

    docker run [OPTIONS] IMAGE [COMMAND] [ARG..]

Environment variable required to start the application are:

IGNITE_EDITOR_API_SECRET: "<Your IgniteConnex Secret key>"
DATABASE_URL: "<Database URL>"
START_MODE: "BUILD"

Appendix

Docker Compose

Sample docker-compose.yml file for application development.

version: "3.9"
services:
postgres:
image: postgres
restart: always
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
ignite:
image: cybergroupignite/runtime:v2.0.0
ports:
- "1881:1881"
environment:
IGNITE_EDITOR_API_SECRET: "<Your Ignite Secret key>"
DATABASE_URL: "postgres://admin:admin@[postgres]:5432/postgres"
DB_SSL_OPTION: "false"
START_MODE: "PROJECT"
PORT: "1881"
depends_on:
- postgres

This Compose file defines two services: ignite and postgres.

IgniteConnex service

The IgniteConnex service uses a public cybergroupignite/runtime image pulled from the Docker Hub registry.

Postgres service

The postgres service uses a public postgres image pulled from the Docker Hub registry.

Sample for Building Docker Image

Sample Dockerfile file for creating docker image.

FROM cybergroupignite/runtime:v2.0.0
ARG BUILD_VERSION
WORKDIR /usr/src/nodered
RUN echo BUILD_VERSION=${BUILD_VERSION} >> .env
COPY . ./build
RUN npm run compile

Checkout Example Git repository to build docker image using git action & deploy to Heroku.