Coder Social home page Coder Social logo

oracle-quickstart / oci-datastax Goto Github PK

View Code? Open in Web Editor NEW
1.0 5.0 1.0 4.61 MB

Terraform module to deploy DataStax Enterprise (DSE) on Oracle Cloud Infrastructure (OCI)

License: Apache License 2.0

Shell 42.91% HCL 57.09%
terraform oci cloud cassandra datastax dse datastax-enterprise nosql partner-led oracle

oci-datastax's Introduction

oci-datastax

These are Terraform modules that deploy DataStax Enterprise (DSE) on Oracle Cloud Infrastructure (OCI). They are developed jointly by Oracle and DataStax.

Resource Manager Deployment

This Quick Start uses OCI Resource Manager to make deployment easy, sign up for an OCI account if you don't have one, and just click the button below:

Deploy to Oracle Cloud

After logging into the console you'll walk through the selection of variables for the deployment. You'll then select Terraform Actions -> Apply on the stack created, and be able to see the progress of resource creation in the logs in the console. Once that's complete follow the instructions in the Login to DataStax Lifecycle Manager section below. Note, these templates generate an ssh key pair on the fly for LCM -> node connections. The private key is in the terraform state file, therefore treat it as a secret.

Note, if you fork this repo you'll need to change the link for the button to point at your repo.

Local Development

If you prefer to develop locally, ie by running the terraform command you'll need to do some pre deploy setup. That's all detailed here.

Now, you'll want a local copy of this repo. You can make that with the commands:

git clone https://github.com/oracle-quickstart/oci-datastax.git
cd oci-datastax
ls

You need to rename provider.tf.cli -> provider.tf. This is because authentication works slightly differently in ORM vs the CLI.

We now need to initialize the directory with the module in it. This makes the module aware of the OCI provider. You can do this by running:

terraform init

This gives the following output:

Deploy

Now for the main attraction. Let's make sure the plan looks good:

terraform plan

That gives:

If that's good, we can go ahead and apply the deploy:

terraform apply

You'll need to enter a password shared by the cassandra user and OpsCenter admin user, and then yes when prompted. The apply should take about five minutes to run.
Once complete, you'll see something like this:

When the apply is complete, the infrastructure will be deployed, but cloud-init scripts will still be running. Those will wrap up asynchronously. OpsCenter and Lifecycle Manager (LCM) will probably be up five minutes after you run apply. The cluster might take another ten minutes to build after that. Now is a good time to get a coffee.

Login to DataStax Lifecycle Manager

When the terraform apply completed, it printed out the URLs for OpsCenter and LCM. Let's check out LCM first. Open a browser to the URL from the output.

The username is admin and the password is whatever you specified in variables.tf.

In this case, the job isn't done yet. If we drill down on clusters we can see that the nodes have been added but LCM hasn't yet SSH'd into them to install DSE.

Similarly, if we check out the job, we see it hasn't run yet.

Checking back a few minutes later, we see the job is complete!

Login to DataStax OpsCenter

Now that the LCM job is all done, let's take a look at OpsCenter. Open up a browser to that URL. It was printed as output when terraform apply completed.

If everything ran ok, you should see a ring with the number of nodes you specified in variables.tf.

View the Cluster in the Console

You can also login to the web console here to view the IaaS that is running the cluster.

SSH to a Node

These machines are using Ubuntu 16. The default login is ubuntu. You can SSH into the machine with a command like this:

ssh -i ~/.ssh/oci ubuntu@<Public IP Address>

You can debug deployments by investigating the cloud-init log file /var/log/cloud-init-output.log.

If you want to get started interacting with the database you can run cqlsh with the default user cassandra and whatever password you chose when prompted. For instance:

cqlsh -u cassandra -p <password you chose>

This gives:

Destroy the Deployment

When you no longer need the DSE cluster, you can run this to delete the deployment:

terraform destroy

You'll need to enter yes when prompted. Once complete, you'll see something like this:

oci-datastax's People

Contributors

benofben avatar cpoczatek avatar gmflau avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

oci-portfolio

oci-datastax's Issues

Use Instance Pools

...or explain why it's a bad idea and what we need to make it possible.

add disks

looks like the dse nodes don't have disks

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.