Giter Site home page Giter Site logo

cbd-quickstart's Introduction

This project is dedicated to provide template based solutions for creating Cloudbreak deployments on different cloud providers:

Supported providers

Template generation

Prerequisites

Commands

Install dependencies

Run the following command to download the required dependencies.

This command is not mandatory, because the command that are require dependencies will run this make target before start to run.

make deps

Generate templates

Run the following command to generate templates for all available cloud providers. The VERSION env variable needs to be exported or specified to run this command.

The generation can be run only for one provider: make generate-azure, make generate-aws and make generate-gcp According to the AWS documentation the Cloudformation Stack template URL must point to a template with a maximum size of 460,800 bytes that is stored in an S3 bucket that you have read permissions to... So the AWS template generation mechanism tries to upload the generated template to an existing S3 bucket and the AWS_ACCESS_KEY_ID and the AWS_SECRET_ACCESS_KEY env variables must be specified. The UPLOAD_BUCKET which value is cbd-quickstart by default could be overridden.

export VERSION=2.7.0-dev.127
export AWS_ACCESS_KEY_ID=XXXX.....
export AWS_SECRET_ACCESS_KEY=XZZZD.....

make generate-all

or

AWS_SECRET_ACCESS_KEY=XZZZD..... AWS_ACCESS_KEY_ID=XXXX..... VERSION=2.7.0-dev.127 make generate-all

Commit and push the result of the template generation to github

The VERSION env variable is also mandatory for this command. It only creates a commit on the checkouted branch with all of the modified files, tags it with the configured value of VERSION and pushes local modifications to the remote branch.

export VERSION=2.7.0-dev.127
make push-updated-templates

or

VERSION=2.7.0-dev.127 make push-updated-templates

cbd-quickstart's People

Contributors

aszegedi avatar biharitomi avatar gergopapi2 avatar keyki avatar pdarvasi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cbd-quickstart's Issues

Sudo permissions not assigned on quickstart deployment to non-aws images

Hi,
I was going through the azure quickstart template for GA release 2.7.1, because some of my deployments were failing. Upon looking at https://github.com/hortonworks/cbd-quickstart/blob/2.7.1/azure/mainTemplate.json

I see that instead of using https://github.com/hortonworks/cbd-quickstart/blob/2.7.1/azure/install-cbd.sh in the azure subfolder, the install script extension is using https://github.com/hortonworks/cbd-quickstart/blob/2.7.1/install-and-start-cbd.sh from the main directory.

In the file, I see that the main() if loop does not have a function similar to aws_prepare_os_user() for assigning sudo permissions to non-aws deployments.

main() {
    init

    if [[ -d "${AWS_BIN_LOCATION}" ]]; then
        get_aws_metadata_profile
        aws_prepare_os_user
        : ${WAIT_HANDLE_URL:? required}
    else
        custom_data
    fi

    download_cbd
    download_cb_cli
    set_perm
    su $OS_USER -c "install_cbd"
}
aws_prepare_os_user() {
    mkdir -p /home/$OS_USER/.ssh
    cp /home/ec2-user/.ssh/authorized_keys /home/$OS_USER/.ssh/
    chown -R $OS_USER:$OS_USER /home/$OS_USER/.ssh
    service sshd reload
    echo "# This is generated by the Cloudbreak deployment's cloud-init script" >> /etc/sudoers.d/cloudbreak
    echo "cloudbreak ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/cloudbreak
}

I have created a PR from my fork as a potential fix with a non_aws_prepare_os_user function.

non_aws_prepare_os_user() {
    echo "# This is generated by the Cloudbreak deployment's cloud-init script" >> /etc/sudoers.d/cloudbreak
    echo "cloudbreak ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/cloudbreak
}

Will link the PR here, please see if this is a valid fix

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.