Skip to content

Instantly share code, notes, and snippets.

@robrich
Last active October 12, 2021 16:35
Embed
What would you like to do?
MemSQL Vagrant Dev Cluster
#!/bin/bash
# See docs for more:
# https://docs.memsql.com/v7.0/guides/deploy-memsql/self-managed/memsql-tools/single-host/native/step-2/
# https://docs.memsql.com/v7.0/guides/deploy-memsql/self-managed/cluster-configuration/system-requirements/
wget -O - 'https://release.memsql.com/release-aug2018.gpg' 2>/dev/null | apt-key add -
apt-key list
apt install -y apt-transport-https
echo "deb [arch=amd64] https://release.memsql.com/production/debian memsql main" | tee /etc/apt/sources.list.d/memsql.list
apt update
apt install -y memsql-toolbox memsql-client memsql-studio
systemctl start memsql-studio
#!/bin/bash
memsql-deploy cluster-in-a-box --license "YOUR_LICENSE_KEY" --password "ANY_ADMIN_PASSWORD" --bind-address 0.0.0.0 -y
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu1904"
# set the provider
config.vm.provider "virtualbox"
# configure the provider
config.vm.provider "virtualbox" do |v|
v.cpus = 4
v.memory = 4096
end
# 3306 is the database engine, 8080 is MemSQL Studio
config.vm.network "forwarded_port", guest: 3306, host: 3306
config.vm.network "forwarded_port", guest: 8080, host: 8080
# share current folder so scripts are available
config.vm.synced_folder ".", "/vagrant", disabled: false
config.vm.provision "shell", path: "provision.sh"
config.vm.provision "shell", privileged: false, inline: "/bin/bash --login /vagrant/start.sh"
end
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu1904"
# set the provider
config.vm.provider "hyperv"
# configure the provider
config.vm.provider "hyperv" do |v|
v.cpus = 4
v.memory = 4096
v.maxmemory = 4096
v.enable_virtualization_extensions = true # hyperv only
end
# 3306 is the database engine, 8080 is MemSQL Studio
config.vm.network "forwarded_port", guest: 3306, host: 3306
config.vm.network "forwarded_port", guest: 8080, host: 8080
# share current folder so scripts are available
config.vm.synced_folder ".", "/vagrant", disabled: false
config.vm.provision "shell", path: "provision.sh"
config.vm.provision "shell", privileged: false, inline: "/bin/bash --login /vagrant/start.sh"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment