The Cornerstone project was developed out of the need for streamlining the development process using DataStax Enterprise for demos, proof of concepts, and standalone applications.
Vagrant can be downloaded here: https://www.vagrantup.com/downloads.html
Vagrant will be used to orchestrate launching machines in all supported platforms.
In order to get AWS support through Vagrant, the following commands must be run:
vagrant plugin install vagrant-aws
vagrant box add dummy https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box
In order to get Azure support through Vagrant, the following commands must be run:
vagrant plugin install vagrant-azure
vagrant box add azure https://github.com/msopentech/vagrant-azure/raw/master/dummy.box
VirtualBox can be downloaded here: https://www.virtualbox.org/wiki/Downloads
VirtualBox will be the main virtual machine provider of the Cornerstone project. This will enable free orchestration across all platforms for all users.
set_credentials.sh.template must be copied and configured using the filename
set_credentials.sh within Cornerstone's base directory.
Any demo can be started locally by running the appropriate file located in the
run/ directory.
To start a project, run:
./run/datastax/<project>/run
For the base Cornerstone project, use cornerstone-python as the project name.
Note: If you get the error:
A host only network interface you're attempting to configure via DHCP
already has a conflicting host only adapter with DHCP enabled.
Running VBoxManage dhcpserver remove --netname HostInterfaceNetworking-vboxnet0
should fix the issue.
Note: In some setups, VirtualBox's main application must be closed in order to complete a successful launch.
Note: If you attempted a run script without properly setting up your credentials
you may need to run vagrant destroy -f and try your run script again.
The last message of a successful run of the Cornerstone project will look similar to this:
==> singlenode: Machine 'singlenode' has a post `vagrant up` message. This is a message
==> singlenode: from the creator of the Vagrantfile, and not from Vagrant itself:
==> singlenode:
==> singlenode: Visit:
==> singlenode: http://192.168.101.7:5000 for Cornerstone
Following the mentioned URLs will allow access to the web interface.
Running the following command will allow access to the development machine:
vagrant ssh singlenode
If you want to create a new cornerstone-python based demo which starts up a Python Flask-based webserver, run the command:
./getting-started/new-cornerstone-project <contributions|showcase|datastax> <project-name-with-hyphens>
If you want to create a new demo from scratch using your own webserver, run the command:
./getting-started/new-base-project <contributions|showcase|datastax> <project-name-with-hyphens>
Be sure to read the contributing guide for a full explanation of directories.
The base directory of the Cornerstone project, ., on the host machine will
always be mapped to the /cornerstone directory on the guest VM.
The cache/ directory within the base directory of the Cornerstone project on
the host machine will also be mapped to the /cache directory on the guest VM.
This functionality is provided by Vagrant's synced folders which allows local changes on the host machine to automatically be replicated to the guest VM.
When running in the cloud, synced folders will be disabled and git clones of the Cornerstone repo will be used.
If the existing cache becomes a problem, deleting the entire cache/ directory
will force a full download on the next vagrant up command.
To destroy all machines launched from the current directory, run:
source set_credentials.sh
vagrant destroy -f [machine-name]
To clear the cache:
rm -rf cache/
To contribute to the Cornerstone project, or to fork the Cornerstone project for other projects, take a look at the documentation provided in the contributing guide and the documentation directory.