Ubuntu Pastebin

Paste from ubuntu at Fri, 3 Jun 2016 16:45:21 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash

function write_config {
cat <<-EOF > apps.yaml
mysql:                                                                          
  dataset-size: 50%                                                             
  max-connections: 20000                                                        
  root-password: changeme                                                       
  sst-password: changeme                                                        
keystone:                                                                       
  admin-password: openstack                                                     
  admin-token: ubuntutesting                                                    
  openstack-origin: cloud:trusty-liberty                                        
congress:                                                                       
  source-branch: stable/liberty   
EOF
}

function clean {
    rm -rf trusty
    rm -rf charm-congress
}

function collect {
    mkdir -p trusty;
    (cd trusty; git clone -b bug/congress-fix git@github.com:gnuoy/charm-keystone.git keystone; )
    git clone git@github.com:gnuoy/charm-congress.git
} 

function build {
    export http_proxy=http://squid.internal:3128
    (cd charm-congress; charm build -s trusty  -obuild src)                       
    unset http_proxy
    mv charm-congress/build/trusty/congress trusty
}

function deploy {
    juju deploy --config apps.yaml cs:trusty/percona-cluster mysql
    juju deploy --config apps.yaml local:trusty/keystone                                                                                                         
    juju deploy --config apps.yaml local:trusty/congress                                                                                                         
    juju deploy cs:trusty/rabbitmq-server 
}

function relations {
    juju add-relation keystone mysql
    juju add-relation congress mysql
	juju add-relation congress keystone 
	juju add-relation congress rabbitmq-server
}

function congress_test {
    . ~/openstack-charm-testing/novarc
    openstack congress datasource create neutronv2 "neutronv2" \
	   --config username=$OS_USERNAME \
	   --config tenant_name=$OS_TENANT_NAME \
	   --config password=$OS_PASSWORD \
	   --config auth_url=$OS_AUTH_URL
}

clean
collect
build
write_config
deploy
relations
Download as text