# Service Factory


## Overview

### What is Service Factory

- Service Factory provides creating, packaging and publishing services.

### How to use Service Factory

- Create a Micro-Service
  - Enter the service name and description, and choose to create it directly or through a template.  

    ![service_factory_create1](./image/service_factory/service_factory_create1.png)

  - Choose to create via template then fill in the code repository information. 

  ![service_factory_create2](./image/service_factory/service_factory_create2.png) 

  - Dockerfile and runtime config are automatically generated through a template.  

    ![service_factory_create3](./image/service_factory/service_factory_create3.png)
    ![service_factory_create4](./image/service_factory/service_factory_create4.png)

  - Finally click **Create**.  

- Locally test services.
- Packaged, tested and published by CICD.
  - The CICD page is available to view information about the services created.

      ![service_factory_cicd](./image/service_factory/service_factory_cicd.png) 

  - Click **Action** and select CICD for packaging on the CICD page service.
    - Change Log：The changes in this package can be left unfilled.
    - Build Args: Parameters that can be passed to jenkins can be left unfilled.
    - Stream：Pack code branch, not filled as master.
    - Version：The x.y.z format is the official version.

    ![service_factory_build](./image/service_factory/service_factory_build.png)    
    
  - Select **Deploy with existing image** to publish.

  ![service_factory_deploy](./image/service_factory/service_factory_deploy.png) 
    
### Usage Scenarios

- Develop new services and create services through templates.
- Create existing services on the platform and associate code repositories.
- Package and publish services.
## Page

- [Devops](https://portal.insuremo.com/#/home/utility-and-admin/devOps)

## API

## Best Practices

- See [Detailed document](https://docs.insuremo.com/common/doc_00000298)