Skip to main content

No project description provided

Project description

Introduction

Endoscopie는 OS 이미지로 생성된 Virtual Machine(이하 VM)의 기본 동작을 테스트하는 도구입니다.

endoscopie는 내시경을 의미(endoscopy)하는 단어로 VM 내부를 들여다보고(?) 검사하는 도구

Installation

Requirements

  • python >= 3.9, < 4.0
  • terraform

Install Terraform

CentOS/RHEL

  1. Install yum-utils package
$ sudo yum install -y yum-utils
  1. Add yum repository
$ sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
  1. Confirm repository is added
$ sudo dnf repolist
repo id       repo name
hashicorp     Hashicorp Stable - x86_64
  1. Install terraform
$ sudo yum -y install terraform

Ubuntu/Debian

  1. You will use these packages to verify HashiCorp's GPG signature and install HashiCorp's Debian package repository.
$ sudo apt-get update && sudo apt-get install -y gnupg software-properties-common
  1. Install the HashCorp GPG key
$ wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | \
    sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
  1. Verify the key's fingerprint
$ gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint
  1. Add the official HashiCorp repository to your system.
$ echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
    https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \
    sudo tee /etc/apt/sources.list.d/hashicorp.list
  1. Download the package information from HashiCorp.
$ sudo apt update
  1. Install Terraform from the new repository
$ sudo apt-get -y install terraform

OS X

  1. First, install the HashiCorp tap, a repository of all our Homebrew packages.
$ brew tap hashicorp/tap
  1. Now, install Terraform with hashicorp/tap/terraform.
$ brew install hashicorp/tap/terraform
  1. To update to the latest version of Terraform, first update Homebrew.
$ brew update
  1. Then, run the upgrade command to download and use the latest Terraform version.
$ brew upgrade hashicorp/tap/terraform

Verify the installation

Verify that the installation worked by opening a new terminal session and listing Terraform's available subcommands.

$ terraform --help
Usage: terraform [global options] <subcommand> [args]

The available commands for execution are listed below.
The primary workflow commands are given first, followed by
less common or more advanced commands. 
...

Install Endoscopie

$ pip install endoscopie==0.1.0

Test Configuration

endoscopie로 테스트를 수행할 때, OS 이미지에 대한 정보와 더불어 VM이 생성된 후 의도한 대로 동작하고 있는지를 확인할 수 있는 정보들도 제공해야 합니다. 아래에 테스트 실행을 위한 필수 필드와 검증해야할 정보들을 보여주는 .yaml 파일 예시가 있습니다.

openstack:
  OS_REGION_NAME: # region name (ex: kr-central-1)
  OS_AUTH_URL: # openstack auth url
  OS_AUTH_TYPE: # v3applicationcredential
  OS_APPLICATION_CREDENTIAL_ID: # openstack application credential id 
  OS_APPLICATION_CREDENTIAL_SECRET: # openstack application credential secret
bastionHost:
  ip: # Bastion host ip(v4) 
  user: # OS login username
  keypair:
    name: # keypair file name for bastion host
    path: # keypair file path for bastion host
instance:
  keypair:
    name: # keypair file name for new instances
    path: # keyapir file path for new instances
    description:
  vpc:
    id: # user vpc id
    subnet: # user vpc subnet id
    securityGroups:
      - # security groups
images:
  - id: # OS image id 
    name: # OS image name (ex: Ubuntu 18.04)
    osType: # type of os name (ex: ubuntu, centos, rocky, or almalinux)
    osVersion: # OS version
    osUser: # OS username (for login user)
    volumeSize: # root volume size (ex: 100) GiB
    flavors:
      - name: # flavor name
        id:  # flavor id
    userScript:
      path: 
    assertThat:
      resources:
        - vCPU: 
          memory: 
          volume: 
      processes:
        - # running processe(s)
      ports:
        - # opened port(s)
  ...

Description

위에 예시로 제시된 필드 대부분은 필수 필드이며, 생각 가능한 경우 별도 표시

  • openstack: 테스트 수행 환경의 사용자 인증 정보 설정
  • bastionHost: 사설망에 생성되는 VM에 접속하기 위한 bastion host 정보 설정
  • instance: 생성되는 VM에 공통적으로 적용되는 정보 설정
  • images: 테스트할 이미지와 플레이버 정보, 생성된 VM 검사를 위한 조건 설정
    • flavors : 여러개의 플레이버 정보를 설정 가능
    • assertThat.resources: flavors에 설정한 개수와 순서대로 설정

Usage

To get a list of basic options and switches use:

$ endoscopie --help

 Usage: endoscopie [OPTIONS] COMMAND [ARGS]...

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion        [bash|zsh|fish|powershell|pwsh]  Install completion for the specified shell. [default: None]                                                                         │
│ --show-completion           [bash|zsh|fish|powershell|pwsh]  Show completion for the specified shell, to copy it or customize the installation. [default: None]                                  │
│ --help                                                       Show this message and exit.                                                                                                         │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ cleanup                                                                                                                                                                                          │
│ run                                                                                                                                                                                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Command run

$ endoscopie run --help

 Usage: endoscopie run [OPTIONS]

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ *  --config        PATH  Set YAML file in which the datas required for image verify. [default: None] [required]                                                                                  │
│    --help                Show this message and exit.                                                                                                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Command cleanup

$ endoscopie cleanup --help

 Usage: endoscopie cleanup [OPTIONS]

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

endoscopie-0.1.1.tar.gz (17.0 kB view hashes)

Uploaded Source

Built Distribution

endoscopie-0.1.1-py3-none-any.whl (17.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page