- ~50GB MySQL Application
- Main motivation: PostGis
- Migration made with a custom tool(xml2pgcopy) and mysqldump on 45min
. /etc/os-release
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O Release.key
sudo apt-key add - < Release.key
sudo apt-get update -qq
sudo apt-get -qq -y install buildah
``
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WITH table_stats AS ( | |
| SELECT | |
| schemaname, | |
| tablename, | |
| pg_relation_size(schemaname || '.'|| tablename) as table_size, | |
| (pg_total_relation_size(schemaname || '.'|| tablename) - pg_relation_size(schemaname || '.'|| tablename)) as index_size, | |
| pg_total_relation_size(schemaname || '.'|| tablename) as total_size | |
| FROM | |
| pg_tables | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| "time" | |
| "github.com/go-pg/pg" | |
| ) | |
| const maxWorkers = 5 |
About the virtual machines and network details, see this blog post
Run on both servers:
yum install postgresql95-server postgresql95-contrib pgpool-II-95
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- tested in PostgreSQL 8.4.4 | |
| DROP VIEW IF EXISTS vw_all_table_locks CASCADE; | |
| CREATE VIEW vw_all_table_locks AS | |
| SELECT | |
| pg_namespace.nspname as schemaname, | |
| pg_class.relname as tablename, | |
| pg_locks.mode as lock_type, | |
| age(now(),pg_stat_activity.query_start) AS time_running | |
| FROM pg_class | |
| JOIN pg_locks on pg_locks.relation = pg_class.oid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -ex | |
| export PGBIN=/usr/pgsql-9.3/bin | |
| export PGUSER=postgres | |
| export PGDATABASE=bench | |
| export DATADIR=/dados/pgbench | |
| export CLUSTER_LOG=/tmp/benchmark.log | |
| export TOTAL_CPUS=$(grep 'cpu cores' /proc/cpuinfo | uniq | awk '{print $NF}') |
From: https://www.stereolabs.com/docs/docker/building-arm-container-on-x86/
-
Install the necessary packages:
sudo dnf install qemu qemu-user-binfmt qemu-user-static
-
Run qemu setup:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - hosts: localhost | |
| connection: local | |
| vars: | |
| gather_facts: False | |
| vars: | |
| keypair: "my-keypair-name" | |
| instance_type: m4.large | |
| security_group: | |
| - "vpc-group-1" |
NewerOlder