def start(parameter_list):
    """
        start stack creation
    """
    parse_and_replace_parameter_list(get_terraform_folder(), parameter_list)
    print("Deploying Dockerized Jenkins server==============>")
    get_and_add_docker_jenkins_config(get_docker_path() + "/jenkins/")
    check_jenkins_pem()

    # Deploy Gitlab docker and get configuration details
    print("Deploying Dockerized Gitlab server==============>")
    get_and_add_docker_gitlab_config(get_docker_path() + "/gitlab/",
                                     parameter_list[1])

    # All variables are set and ready to call terraform
    os.chdir(get_terraform_folder())

    print("Invoking Terraform==============================>")
    subprocess.call(
        'nohup ./scripts/create.sh | tee ../../stack_creation.out&',
        shell=True)
    print("Copying Terraform destroy script================>")
    subprocess.call('cp ./scripts/destroy.sh ../../'.split(' '))

    print(
        "\n\nPlease execute  tail -f stack_creation.out | grep 'Creation complete' in the below directory to see the stack creation progress "
    )
    print(os.path.realpath('../../'))
    print("\n\n")
Esempio n. 2
0
def start(parameter_list):
    """
        start stack creation
    """
    parse_and_replace_parameter_list(TERRAFORM_FOLDER_PATH, parameter_list)

    # Get Bitbucket configuration details
    get_and_add_existing_bitbucket_config(TERRAFORM_FOLDER_PATH)

    # Launch the Jenkins Docker
    print("Deploying Dockerized Jenkins server==============>")
    get_and_add_docker_jenkins_config(JENKINS_DOCKER_PATH)
    check_dockerised_jenkins_pem()

    # All variables are set and ready to call terraform
    os.chdir(TERRAFORM_FOLDER_PATH)

    subprocess.call('nohup ./scripts/create.sh >>../../stack_creation.out&',
                    shell=True)
    subprocess.call('cp ./scripts/destroy.sh ../../'.split(' '))

    print(
        "\n\nPlease execute  tail -f stack_creation.out | grep 'Creation complete' in the below directory to see the stack creation progress "
    )
    print(os.path.realpath('../../'))
    print("\n\n")
Esempio n. 3
0
def start(parameter_list):
    """
        start stack creation
    """
    # Parse the parameter list
    parse_and_replace_parameter_list(get_terraform_folder(), parameter_list)
    os.chdir(get_terraform_folder())

    # Get Jenkins configuration details
    get_and_add_existing_jenkins_config(get_terraform_folder())

    # Get Bitbucket configuration details
    get_and_add_existing_bitbucket_config(get_terraform_folder())

    if os.environ['CODE_QUALITY'] == 'true':
        # Get Sonar configuration details
        get_add_existing_sonar_config(get_terraform_folder())

    # Make Sure Jenkins pem file is present in home folder
    check_jenkins_pem()

    # All variables are set and ready to call terraform
    os.chdir(get_terraform_folder())

    subprocess.call('nohup ./scripts/create.sh >>../../stack_creation.out&',
                    shell=True)
    subprocess.call('cp ./scripts/destroy.sh ../../'.split(' '))

    print(
        "\n\nPlease execute  tail -f stack_creation.out | grep 'Creation complete' in the below directory to see the stack creation progress "
    )
    print(os.path.realpath('../../'))
    print("\n\n")
Esempio n. 4
0
def start(parameter_list):
    """
        start stack creation
    """
    parse_and_replace_parameter_list(get_terraform_folder(), parameter_list)

    if os.environ['CODE_QUALITY'] == 'true':