Skip to content

Commit

Permalink
Merge pull request openebs#93 from yudaykiran/master
Browse files Browse the repository at this point in the history
Added code to pull jiva images during OSH vagrant up.
  • Loading branch information
kmova authored Apr 6, 2017
2 parents 8984d01 + 6611a50 commit 617e4a7
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 11 deletions.
24 changes: 13 additions & 11 deletions k8s/demo/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DEPLOY_MODE_HC = 2
deploy_Mode=ENV['OPENEBS_DEPLOY_MODE'] || 1

#Specify the release versions to be installed
MAYA_RELEASE_TAG = ENV['MAYA_RELEASE_TAG'] || "0.2-RC3"
MAYA_RELEASE_TAG = ENV['MAYA_RELEASE_TAG'] || "0.2"

#TODO - Verify
#LC_ALL is not set on OsX, it will inherit it from SSH on Linux though,
Expand Down Expand Up @@ -93,7 +93,6 @@ def configureVM(vmCfg, hostname, cpus, mem)
vmCfg.vm.provision "shell", inline: <<-SHELL
echo "ubuntu:ubuntu" | sudo chpasswd
SHELL


#Adding Vagrant-cachier
if Vagrant.has_plugin?("vagrant-cachier")
Expand Down Expand Up @@ -286,11 +285,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

host_ip_address = `#{get_ip_address}`

@machine.communicate.sudo("echo 'export \
NOMAD_ADDR=http://#{host_ip_address.strip}:4646' >> \
@machine.communicate.sudo("echo \
'export NOMAD_ADDR=http://#{host_ip_address.strip}:4646' >> \
/home/ubuntu/.profile")
@machine.communicate.sudo("echo 'export \
MAPI_ADDR=http://#{host_ip_address.strip}:5656' >> \
@machine.communicate.sudo("echo \
'export MAPI_ADDR=http://#{host_ip_address.strip}:5656' >> \
/home/ubuntu/.profile")
end
end
Expand Down Expand Up @@ -355,15 +354,18 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
@machine.communicate.sudo("bash \
/home/ubuntu/demo/maya/scripts/configure_osh.sh \
--masterip=#{master_ip_address.strip} \
--releasetag=#{MAYA_RELEASE_TAG}")
--releasetag=#{MAYA_RELEASE_TAG}")
end

@machine.communicate.sudo("echo 'export \
NOMAD_ADDR=http://#{host_ip_address.strip}:4646' >> \
@machine.communicate.sudo("echo \
'export NOMAD_ADDR=http://#{host_ip_address.strip}:4646' >> \
/home/ubuntu/.profile")
@machine.communicate.sudo("echo 'export \
MAPI_ADDR=http://#{host_ip_address.strip}:5656' >> \
@machine.communicate.sudo("echo \
'export MAPI_ADDR=http://#{host_ip_address.strip}:5656' >> \
/home/ubuntu/.profile")

@machine.communicate.sudo("docker pull \
openebs/jiva")
end
end
end
Expand Down
34 changes: 34 additions & 0 deletions k8s/demo/specs/demo-mysql-openebs-plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
apiVersion: v1
kind: Pod
metadata:
name: mysql
labels:
name: mysql
spec:
containers:
- resources:
limits:
cpu: 0.5
name: mysql
image: mysql
args:
- "--ignore-db-dir"
- "lost+found"
env:
- name: MYSQL_ROOT_PASSWORD
value: k8sDem0
ports:
- containerPort: 3306
name: mysql
volumeMounts:
- mountPath: /var/lib/mysql
name: demo-vsm1-vol1
volumes:
- name: demo-vsm1-vol1
flexVolume:
driver: "openebs/openebs-iscsi"
options:
name: "demo-vsm1-vol1"
openebsApiUrl: "http://172.28.128.5:5656/latest"
size: "5G"

0 comments on commit 617e4a7

Please sign in to comment.