This talk is all live demos of tools developers can use in their inner-loop, at development time to be more productive with containers.
Docker Compose captures the build arguments and run arguments so we can focus on our coding.
# A deployment ensures pod(s) are restarted on failure | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: memsql | |
spec: | |
replicas: 1 # only create one pod (container) | |
selector: | |
matchLabels: | |
app: memsql |
version: '2' | |
services: | |
memsql: | |
image: 'memsql/cluster-in-a-box' | |
ports: | |
- 3306:3306 | |
- 8080:8080 | |
environment: | |
LICENSE_KEY: ${LICENSE_KEY} |
CREATE DATABASE hellomemsql; | |
USE hellomemsql; | |
CREATE TABLE test ( | |
message text NOT NULL | |
); | |
INSERT INTO test (message) VALUES ('this is a sample message'); | |
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 |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: myapp | |
labels: | |
app: myapp | |
spec: | |
replicas: 3 | |
template: | |
metadata: |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: memsql-operator-envvar | |
namespace: memsql | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
name: memsql-operator-envvar |