Project

Profile

Help

Task #8340

generate maxscale.pem during mdbci install

Added by Mark Zaslavskiy almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Timofey Turenko
Category:
-
Sprint/Milestone:
Start date:
24.05.2017
Due date:
% Done:

0%

Estimated time:
Target branch:
Test scenario:

https://github.com/mariadb-corporation/mdbci/pull/14

Tests must be conducted on servers (max-tst-01 or maxscale-jenkins) or to test locally - install aws cli by running: sudo pip install awscli

Test#1: Create some AWS machine to tests scripts: https://github.com/mariadb-corporation/mdbci/pull/14/files#diff-90be55850b3d9061487604a1c44e186e and https://github.com/mariadb-corporation/mdbci/pull/14/files#diff-7b4579624385d2da9047b8a57f9e06ec
Result#1: after scripts ended both machines should have installed and configured aws cli tool with profile 'mdbci' configured - to check run: aws --profile mdbci iam get-user - it will show some json data and run: aws --profile mdbci configure list - it will show info about credentials for profile 'mdbci'

Test#2: Use one of previous machines. Change dir to mdbci. Load boxes to BOXES dir in mdbci from https://github.com/mariadb-corporation/mdbci-boxes. Run: ./mdbci generate --template confs/aws_lite.json TEST_123_$(date +%s). It will generate some AWS machines. go to vagrant config dir and start one of machines with vagrant up. If machine boots and available by ssh - everything ok.


Description

18:03] 
timofey.turenko есть такая мысль насчёт maxscale.pem - а может его генерировать при установке mdbci? дополнить mdbci командой/скриптом, который сделает простую вещь: спросит у пользователя AWS credentials, регион и запишет из в aws-config.yaml и в .aws/credentials, установит на эти файлы правильные права (читать может только хозяин), сгенерирует key-pair и security group для данной установки mdbci.

[18:03] 
тогда не надо держать в репозитории maxscale.pem, он будет разный на разных хостах

[18:07] 
думаю задача не очень сложная, скрипт для работы с aws могу помочь написать, хотя там лучше не скрипт, а нормальный код (aws cli возвращает всё в json). Я детал тест для maxscale с активный пользованием aws cli - код был на С и он тупо вызывал system("aws ec2 ....") и парсил ответ с помощью jansson

History

#1 Updated by Mark Zaslavskiy almost 4 years ago

  • Description updated (diff)

#2 Updated by Mark Zaslavskiy almost 4 years ago

  • Priority changed from High to Immediate

#3 Updated by Alexander Kaluzhny almost 4 years ago

  • Status changed from New to Active / In progress

#4 Updated by Alexander Kaluzhny almost 4 years ago

  • Status changed from Active / In progress to New

#5 Updated by Alexander Kaluzhny almost 4 years ago

  • Status changed from New to Active / In progress

#6 Updated by Alexander Kaluzhny almost 4 years ago

  • Status changed from Active / In progress to Review
  • Assignee changed from Alexander Kaluzhny to Mark Zaslavskiy
  • Test scenario updated (diff)

https://github.com/mariadb-corporation/mdbci/pull/14

Tests must be conducted on servers (max-tst-01 or maxscale-jenkins) or to test locally - install aws cli by running: sudo pip install awscli

Test#1: Create some AWS machine to tests scripts: https://github.com/mariadb-corporation/mdbci/pull/14/files#diff-90be55850b3d9061487604a1c44e186e and https://github.com/mariadb-corporation/mdbci/pull/14/files#diff-7b4579624385d2da9047b8a57f9e06ec
Result#1: after scripts ended both machines should have installed and configured aws cli tool with profile 'mdbci' configured - to check run: aws --profile mdbci iam get-user - it will show some json data and run: aws --profile mdbci configure list - it will show info about credentials for profile 'mdbci'

Test#2: Use one of previous machines. Change dir to mdbci. Load boxes to BOXES dir in mdbci from https://github.com/mariadb-corporation/mdbci-boxes. Run: ./mdbci generate --template confs/aws_lite.json TEST_123_$(date +%s). It will generate some AWS machines. go to vagrant config dir and start one of machines with vagrant up. If machine boots and available by ssh - everything ok.

#7 Updated by Alexander Kaluzhny almost 4 years ago

  • Test scenario updated (diff)

#8 Updated by Alexander Kaluzhny almost 4 years ago

  • Test scenario updated (diff)

#9 Updated by Mark Zaslavskiy almost 4 years ago

  • Status changed from Review to New
  • Assignee changed from Mark Zaslavskiy to Alexander Kaluzhny

Please update documentation with instruction of how to setup mdbci for using aws on local machine.

#10 Updated by Alexander Kaluzhny almost 4 years ago

  • Test scenario updated (diff)

#11 Updated by Alexander Kaluzhny almost 4 years ago

  • Status changed from New to Review
  • Assignee changed from Alexander Kaluzhny to Mark Zaslavskiy

#12 Updated by Mark Zaslavskiy almost 4 years ago

  • Assignee changed from Mark Zaslavskiy to Alexander Kaluzhny

#13 Updated by Alexander Kaluzhny almost 4 years ago

  • Status changed from Review to Testing
  • Assignee changed from Alexander Kaluzhny to Timofey Turenko

#14 Updated by Timofey Turenko over 3 years ago

  • Status changed from Testing to Closed

Also available in: Atom PDF