Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

[Iris 2.0] CI improvements

Roxana Robotin edited this page Jan 31, 2019 · 11 revisions

Title:

CI improvements

Author(s):

Roxana Robotin, Andrei Filip

Tracking issue:

13

Short description:

Continuous integration is made using Travis and AWS machines to start test builds integrated in our GitHub project.

Use case(s):

At the moment we only integrated, with Travis, 2 tests which run using a virtual Linux image each time a commit is made in GitHub (iris). This does not support the keys manipulation.

Keyboard manipulation is fixed in iris2 by using the Xlib library only in the virtual environments. PyAutoGui is going to be used for the physical machines only, when the tests will run on a non-virtual environment. We will implement a solution for the tests to use either one of the libraries (Xlib or pyautogui) based on the environment they are running. Travis builds can start at a certain hour each day on a AWS virtual machine.

Implementation:

  • Overview

A Travis .yml config is used to configure the job. This file will contain the branches or the set of branches on which the job will run. Also this is the place where the connection between AWS instances and the project code is also made.

  • Sample code

deploy: - provider: s3 ⋮ # rest of S3 deployment for MyApp.zip - provider: codedeploy access_key_id: "YOUR AWS ACCESS KEY" secret_access_key: "YOUR AWS SECRET KEY" bucket: "S3 Bucket" key: latest/MyApp.zip application: MyApp deployment_group: MyDeploymentGroup

  • Setup

Travis has an 'install' feature. This can be used to install all of the system dependencies.

Risks:

Since we are going to deploy in an AWS environment, we will need:

  1. An Ubuntu 16.04 AWS EC2 instance with a role containing a S3 read and get policy.
  2. A bucket to store the iris application data
  3. We need an AWS account(access_key_id and secret_access_key) with AmazonS3FullAccess and AWSCodeDeployFullAccess permissions. Also with permissions to start/stop/access the instance and to access the bucket.
  4. Some properties like the region and the bucket the instance belongs to.
  5. We will also need a t.medium instance with a moderate network, in order to run tests flawlessly.
  6. An application and a deployment_group. If this needs too much effort on creating the application, and the group, I think it will be mush easier to have an account with enough permissions to create the application/group.

We need this since we are accessing the instance and the bucket through the travis config file, and also by using a ssh connection.

Estimated schedule:

  • xxxx-xx-xx Spec due date (this)
  • xxxx-xx-xx Implementation
  • xxxx-xx-xx Code review
  • xxxx-xx-xx Testing
  • xxxx-xx-xx Final check-in date

Home

FAQ

Installation

Running Iris

Contributing to Iris

Clone this wiki locally