1.1.15 • Published 6 years ago

exframe-integration v1.1.15

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

Exframe integration

A module for all(new/existing) microservices, used to set up development environment, run cucumber automation test cases. It can be easily integrated with existing microservices. It will help developers to set up their microservice development enviroment without worring about all dependencies.

Below are the important features of this module

  • To run automation test cases for our business model.
  • To set up local development environment usefull for developers.
  • To test and see test test report.
  • To up all services, usefull for QA.
  • Simple commands to integrate and run.

Prerequisites

Software and Tools:
  1. npm should be installed.

    npm --version 
  2. node should be installed.

    node --version 
  3. docker should be installed.

    docker --version 
  4. docker-compose should be installed.

    docker-compose --version

Auth certificate:

Auth certificate should be installed properly in your machine to access local docker images. If it is not installed you will not be able to access all local docker repositories.

In Linux :

Follow below commands to install certificate

sudo  mkdir /usr/local/share/ca-certificates/docker-dev-cert/
sudo cp ExzeoDockerHubCA.crt /usr/local/share/ca-certificates/docker-dev-cert/
sudo update-ca-certificates
sudo systemctl reload docker.service

Note Make sure ExzeoDockerHubCA.crt is placed inside your current directory from which you are exexuting the commands. Make sure ExzeoDockerHubCA.crt is placed inside your current directory from which you are exexuting the commands. Computer restart is required.

In Windows :

Please follow below steps :

  • Open Windows Explorer, right-click the certificate, and choose Install certificate.
  • Then, select the following options: Store location: local machine Check ‘place all certificates in the following store’ Click ‘Browser’, and select ‘Trusted Root Certificate Authorities’ Click ‘Finish’ Learn more about managing TLS certificates After adding the CA certificate to Windows, restart Docker for Windows.
Docker login:

Please make sure you are logged-in in 'docker' in your local machine. Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to Infra team to create new one for you. Please use following command to login :

docker login 

Getting started

This section assumes you've working knowledge of Nodejs, npm, Docker(https://en.wikipedia.org/wiki/Docker_(software) and Docker Compose

There are two scenario where you can use this module

  1. New Project/Microservice using exframe generator (Specially for QA):
    1. Install exframe-generator globally using below command:
      npm install exgrame-generator -g
    2. Create a sample project to run HIT, using below commands
      exframe <project-name>
    3. Travel to your newly created project
      cd <project-name>
    4. Run below command to download the npm package for HIT:
      ```
      npm install
      ```

      Upon execution fo above commands your existing service is all set for HIT.

  2. Existing project/microservice
    1. Install exframe-generator globally using below command:
      npm install exgrame-generator -g
    2. Travel to your project directory, from root path, run th following command:
      exframe upgrade
    3. Run below command to download the npm package for HIT:
      ```
      npm install
      ```

      Upon execution fo above 1,2,3 commands your existing service is all set for HIT.

Integration Commands

To start integration process, you need to run only this command :

npm run integration

Once you run above command, a prompt will ask few questions, these are as :

Question 1

Output 1- RUN Local Service with Automation. 2- RUN Local Service without Automation. 3- STOP Containers. 4- REMOVE Containers. 5- UP All Services with automation. 6- UP All Services without automatio.

Below are the description of above options :

1. RUN Local Service with Automatio.

*Specially for a developer who is working on a microservice and he/she wants to achieve below task:

  • To set up all its dependent services for local service. mongo cfs etc for pdf-generator service.
  • To run harmony-quality-controltest case on his local service.
2. RUN Local Service without Automation.

*Specially for a developer who is working on a microservice and he/she wants to achieve below task:

  • To set up all its dependent services for local service. mongo cfs etc for pdf-generator service.

Note - This will not run automation test cases, it will only up all dependent containers/services.

3. STOP Containers.

Using this action you can stop all running containers.

4. REMOVE Containers.

To remove all stopped containers using a single command.

Note - Please stop all containers by selecting 3rd option before performing this action.

5. UP all Services with automation.

This action helps QA guys to set up all containers for all mincro-services from master file, Automation result will be displayed upon successful completion of this action.

Question 2

Output Please enter harmony quality control branch name: (CG-Automation)

Please enter HQC branch name on which you want to run test cases, default value is CG-Automation

Question 3

Output prompt: Please enter harmony quality control model name.: (quoteModel)

Please enter HQC model name which you want on to run while running test cases, default value is quoteModel.

NOTE: This feature is under developement.

Question 4

Output Do you want to pull latest images ? (True/False): (true)

Use this option to pull latest images from docker local repository. Default value is true.

Question 5

prompt: Do you want to give other master source of YMLs ? If yes please enter its name: (master.yml)

If you want to use another YML source for master containers, default is master.yml. Make sure name should be same as remote repository file name.

Troubleshooting

FAQs

  1. I am getting listen tcp 0.0.0.0:80 bind: address already in use error Answer : Please stop currently running local service which is accupied 8080 port number. Please use 3rd and 4th action to stop and remove conainers. If problen persist, please follow below steps : - FInd out process id using below command ps -aux | grep <service-term> eg. mong for mongodb pdf for pdf-generator service - Kill the running process using below command: sudo kill -9 pid

  2. How to list all containers ? Answer : To see all containers and its status use below command : docker ps // to list only up containers docker ps -a // to list all up and exited containers docker ps -a -q // to lis only container ids of up and exited containers

  3. How to stop one or all containers using command ? Answer :Follow below commands : docker stop $(docker ps -a -q) // it will stop all stopped and Up containers. docker stop $(docker ps -a) // It will stop all up containers docker stop <containerId/containerName> // it will stop a single container

  4. How to start one or all containers using command ? Answer :Follow below commands: docker start $(docker ps -a -q) // it will start all stopped and Up containers. docker start $(docker ps -a) // It will start all up containers docker start <containerId/containerName> // it will start a single container

  5. How to remove one or all containers using command ? Answer :Follow below commands : docker rm $(docker ps -a -q) // it will remove all stopped and Up containers. docker rm $(docker ps -a) // It will remove all up containers docker rm <containerId/containerName> // it will remove a single container

1.1.15

6 years ago

1.1.14

6 years ago

1.1.13

6 years ago

1.1.12

6 years ago

1.1.11

6 years ago

1.1.10

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago