(self)
| 652 | self.rabbit_port = 5672 |
| 653 | |
| 654 | def install(self): |
| 655 | self.print_logo() |
| 656 | print('') |
| 657 | print('') |
| 658 | bcolors.printcolor('Welcome To the Diffgram Installer.', bcolors.OKGREEN) |
| 659 | print('') |
| 660 | print('') |
| 661 | |
| 662 | bcolors.printcolor('First We need to know what static storage provider you will use: ', bcolors.OKCYAN) |
| 663 | |
| 664 | print('1. Minio Local Storage [Default]') |
| 665 | print('2. Amazon Web Services S3 (AWS S3)') |
| 666 | print('3. Microsoft Azure Storage (Azure)') |
| 667 | print('4. Google Cloud Storage (GCP)') |
| 668 | option_valid = False |
| 669 | while not option_valid: |
| 670 | option = bcolors.inputcolor('Enter 1, 2, 3 or 4. Or write exit to quit the installation: ') |
| 671 | if option is None or option == '': |
| 672 | # Default to MinIO |
| 673 | option = 1 |
| 674 | option_valid = True |
| 675 | self.set_static_storage_option(option) |
| 676 | elif option.isnumeric() and int(option) in [1, 2, 3, 4]: |
| 677 | option_valid = True |
| 678 | self.set_static_storage_option(int(option)) |
| 679 | elif option == 'exit': |
| 680 | option_valid = True |
| 681 | print('Thanks for using Diffgram :)') |
| 682 | return |
| 683 | else: |
| 684 | print('Invalid option. Please enter either 1, 2, 3 or 4. Write exit to quit the installation process.') |
| 685 | |
| 686 | if self.static_storage_provider == 'gcp': |
| 687 | self.set_gcp_credentials() |
| 688 | if not self.validate_gcp_connection(): |
| 689 | return |
| 690 | elif self.static_storage_provider == 'aws': |
| 691 | self.set_s3_credentials() |
| 692 | if not self.validate_s3_connection(): |
| 693 | return |
| 694 | elif self.static_storage_provider == 'azure': |
| 695 | self.set_azure_credentials() |
| 696 | if not self.validate_azure_connection(): |
| 697 | return |
| 698 | elif self.static_storage_provider == 'minio': |
| 699 | self.set_minio_credentials() |
| 700 | if not self.use_docker_minio: |
| 701 | self.set_minio_credentials() |
| 702 | if not self.validate_s3_connection(): |
| 703 | return |
| 704 | |
| 705 | self.set_diffgram_version() |
| 706 | self.database_config() |
| 707 | self.mailgun_config() |
| 708 | self.rabbit_config() |
| 709 | self.populate_env() |
| 710 | self.launch_dockers() |
| 711 | if self.use_docker_minio: |
no test coverage detected