Esempio n. 1
0
    def print_results(self, stack_name: str, boto3_session: boto3.session.Session) -> None:
        output = aws.get_output(stack_name, boto3_session)
        master_ip = output[constants.cloudformation.DET_ADDRESS]
        region = output[constants.cloudformation.REGION]
        log_group = output[constants.cloudformation.LOG_GROUP]
        ui_command = self.det_ui.format(master_ip=master_ip, region=region, log_group=log_group)
        print(ui_command)

        ssh_command = self.ssh_command.format(master_ip=master_ip)
        print(ssh_command)
Esempio n. 2
0
    def print_results(self, stack_name: str, boto3_session: boto3.session.Session) -> None:
        output = aws.get_output(stack_name, boto3_session)

        bastion_ip = aws.get_ec2_info(output["BastionId"], boto3_session)[
            constants.cloudformation.PUBLIC_IP_ADDRESS
        ]
        master_ip = aws.get_ec2_info(output["MasterId"], boto3_session)[
            constants.cloudformation.PRIVATE_IP_ADDRESS
        ]
        region = output[constants.cloudformation.REGION]
        log_group = output[constants.cloudformation.LOG_GROUP]

        ui_command = self.det_ui.format(
            master_ip=master_ip, bastion_ip=bastion_ip, region=region, log_group=log_group
        )
        print(ui_command)
        print()

        ssh_command = self.ssh_command.format(
            master_ip=master_ip.split(":")[0], bastion_ip=bastion_ip
        )
        print(ssh_command)
        print()