Approach to work with the developer's environment

The main idea of working with the developer's environment

For each development team, an environment is configured that can be controlled using the Rancher utility interface. Link to the Rancher UI application - https://rancher.dev.folio.org/login.

To log in, you need to log in with your GitHub account. The privacy settings will check for an account in the FOLIO project team on GitHub and allow you to manage the environment for this team. This environment was created to provide a fast and continuous development cycle for new functionality and the ability to test it without waiting for daily updates of the main environments.

The main point of using this environment is that a developer can independently rebuild containers with modules from any convenient GitHub branch without completely restarting the environment. Rancher controls also allow you to customize the automatic rebuilding of modules according to specified criteria. For a more convenient development and testing cycle, it is proposed to introduce an approach with new dev branches in each repository of the Folijet team. The development will take place in separate branches and after the end of development, the code will be transferred to the dev branch. Rancher's pipeline will make changes from the dev branch and update the module in the environment. This will allow developers to immediately check the changes in the environment. For this, new statuses will be introduced in Jira. After testing and fixing all bugs, the code will be moved to the master branch and, accordingly, to the folio-testing environment the next day.

Work with Rancher

To launch a module that is not yet active in this environment, Rancher provides the ability to launch it from the application.

Then the developer can choose a needed module to run.

Then choose a team's namespace and click the Launch button.

To restart a module, the developer can update a specific already running module in the Workloads panel.

To check module logs, developer can go to the particular module from Workloads modules list

And open the active container's logs.

Workflow for backend developers

Workflow for UI developers

    There are no changes in general flow for FE developers.

How to deploy platform-complete from particular branch

To deploy platform-complete from the custom branch, you should place the name of this branch to the rancher pipeline configuration. For Folijet  team branch folijet-rancher has been created in the platform-complete repository. Please note, to update folijet-rancher branch, snapshot branch should be used.

For example, if we want to deploy module from ui-for-rancher branch from our ui-data-import repository, then configuration should looks in following way

https://github.com/folio-org/platform-complete/blob/folijet-rancher/package.json#L25


After updating of pipeline configuration you should choose active project from dropdown menu https://rancher.dev.folio.org/login


Navigate to the 'Resources' tab, 'Pipelines' page


Choose 'Run' option from action menu for platform-complete module


Choose appropriate branch (for Folijet team it is folijet-rancher)

In the Detail log you can details of ongoing process

In case if third part (Deploy) failed, then you need to upgrade module manually. For this purpose you should navigate to 'App' tab and choose 'Upgrade' option from action menu

After completeness of all stages you will be able to observe results at the https://folijet.ci.folio.org/

Todo

  • Add a new JIRA status “In Local Review”
  • Add dev branches for all modules on GitHub
  • Create pipelines in Rancher