Skip to content

Instantly share code, notes, and snippets.

@AlexeyFerum
Created June 3, 2022 18:52
Show Gist options
  • Save AlexeyFerum/1188110aa71c79dd2524f211318ca243 to your computer and use it in GitHub Desktop.
Save AlexeyFerum/1188110aa71c79dd2524f211318ca243 to your computer and use it in GitHub Desktop.
# creating virtual machine in yandex cloud
yc config list # check
yc compute instance create \
--name otus22-vm \
--ssh-key ~/.ssh/id_rsa_otus.pub \
--create-boot-disk image-folder-id=standard-images,image-family=ubuntu-1804-lts,size=32,auto-delete=true \
--network-interface subnet-name=default-ru-central1-a,nat-ip-version=ipv4 \
--memory 4G \
--cores 4 \
--hostname otus22-vm
# connect to virtual machine via ssh
ssh -i ~/.ssh/id_rsa_otus yc-user@<public-address>
# install Docker
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add --
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable"
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
sudo usermod -aG docker $USER # after that command relogin with your user to apply changes
source ~/.profile
# install redash
mkdir redash && cd redash/
git clone https://github.com/getredash/setup.git && cd setup/
chmod +x setup.sh
./setup.sh
docker ps
# redash can be accessed at localhost:5000, where localhost is your public ipv4 address
# install metabase
# docker run --name metabase metabase/metabase:v0.41.3.1
docker run -d -p 3000:3000 \
--volume /home/yc-user/metabase/plugins:/plugins \
--name metabase metabase/metabase:v0.41.3.1
# data sources
# clickhouse https://clickhouse.com/docs/en/getting-started/playground/
# postgresql https://uibakery.io/sql-playground
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment