Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a tool that allows the automation of the infrastructure necessary for the testing process. #1589

Closed
Tracked by #1533
jmv74211 opened this issue Jul 9, 2021 · 5 comments · Fixed by #1679
Closed
Tracked by #1533

Comments

@jmv74211
Copy link
Contributor

jmv74211 commented Jul 9, 2021

We want to develop a tool that allows us to deploy an environment for testing. This deployment can be performed locally or remotely, using the following tools and cloud providers:

Local

  • Vagrant
  • Docker

Remote

  • AWS (EC2, ECS)
  • Siteox

It is requested to design and implement a set of modules that allow us to deploy this infrastructure.

Proposed design (updated)

deployment_class_diagram_model

@jmv74211
Copy link
Contributor Author

First conceptual model

With the following model, we can deploy a set of instances that can come from different providers. Its substructure is yet to be defined.

deployment_class_diagram_model

@jmv74211
Copy link
Contributor Author

Second conceptual model

In this second conceptual model, some changes have been made to the diagram.

First of all, the Provider class has been eliminated, since it did not provide any relevant information to the Instance class, but this class itself is abstracted and divided into several types.

Also, we have been doing a more exhaustive analysis on the external python-vagrant and docker modules, to see how we are going to deal with those data structures.

After this, a series of methods and attributes have been proposed for deployment using vagrant or docker.

Regarding EC2Instance (deployment using a cloud provider), its design and implementation have been postponed to the next iterations of this development.

deployment_class_diagram_model

@jmv74211
Copy link
Contributor Author

jmv74211 commented Jul 16, 2021

Design of the QA deployment script flow

The main objective of this script is to provide a parameterized tool that allows us to deploy a set of infrastructure where we can make our testing.

This provisioning can be made using local providers like vagrant or docker, and remote providers like AWS EC2, although this will be developed in the next iterations.

The provisioning script flow is as follows:

deployment_flow_diagram

In order to use this script, it is necessary to specify a set of parameters. These parameters must be specified in a template configuration file, that will be loaded when running the script.

qa_deployment -c <configuration_file_path>

It is proposed a yaml format for this template file. It would present the following structure:

host1:
    provider:
        vagrant:
            enabled: False
            box_name:
            memory:
            cpu:
            vm_name:
            system:
            os:
        docker:
            enabled:
            docker_image:
            ports:
            container_name:
            os:
host2:
    provider:
        vagrant:
        docker:
        ....

**Note: ** It is followed a similar structure to the qa_provisioning configuration file in order to maintain compatibility and integration between the two.

@antoniomanuelfr
Copy link
Contributor

The development of this issue can be tracked in the following branch:
https:/wazuh/wazuh-qa/tree/1589-qactl-infraestructure

@snaow
Copy link
Contributor

snaow commented Aug 6, 2021

Closed by #1679

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants