forked from michalklos/aws-vertica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy_cluster.example
157 lines (139 loc) · 7.08 KB
/
deploy_cluster.example
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
Example output
==============
$ fab -c .fabricrc deploy_cluster:total_nodes=3,eip_allocation_id=eipalloc-xxxxxxxx
Creating VPC...
VPC : vpc-xxxxxxxx
Creating Subnet...
Subnet : subnet-xxxxxxxx
Creating and attaching Internet gateway...
Associating route table...
Creating route in route table...
Deploying bootstrap instance...
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
Successfully created node in EC2
Instance : id:i-xxxxxxxx private_ip_address:10.0.0.92
Elastic Ip: allocation_id:eipalloc-xxxxxxxx public_ip:None
Authorizing security group...
Setting up cluster and creating database...
[[email protected]:22] sudo: mkdir -p /etc/vertica
[[email protected]:22] put: /home/mklos/.aws/vlicense -> /etc/vertica/vlicense
[[email protected]:22] put: /home/mklos/.aws/us-east-1.pem -> /etc/vertica/aws.pem
[[email protected]:22] run: ssh-keyscan -H 10.0.0.92 >> ~/.ssh/known_hosts
[[email protected]:22] out: # 10.0.0.92 SSH-2.0-OpenSSH_5.3
[[email protected]:22] sudo: /opt/vertica/sbin/vcluster -s 10.0.0.92 -L /etc/vertica/vlicense -k /etc/vertica/aws.pem
[[email protected]:22] out: STEP 1 of 5: Building keyless ssh for dbadmin and copying to all nodes
[[email protected]:22] out: INFO: 22: Copying and resetting permissions to .ssh directory for: [email protected]
[[email protected]:22] out: STEP 2 of 5: Copying the Vertica license to all nodes
[[email protected]:22] out: STEP 3 of 5: Configuring spread and copying to all nodes
[[email protected]:22] out: Stopping spread daemon: [ OK ]
[[email protected]:22] out: Starting spread daemon: spread (pid 2269) is running...
[[email protected]:22] out: [ OK ]
[[email protected]:22] out: STEP 4 of 5: Configuring admintools.conf and copying to all nodes
[[email protected]:22] out: STEP 5 of 5: Restarting agent on all nodes
[[email protected]:22] out: Stopping vertica agent:
[[email protected]:22] out: starting agent
[[email protected]:22] out: OK for user: dbadmin
[[email protected]:22] out: INFO: 0: stitch completed successfully
[[email protected]:22] sudo: echo 'S:a
T:1358371544.95
U:500' > /opt/vertica/config/d5415f948449e9d4c421b568f2411140.dat
[[email protected]:22] sudo: ls /home/dbadmin/.ssh/user.pub
[[email protected]:22] out: ls: cannot access /home/dbadmin/.ssh/user.pub: No such file or directory
Warning: sudo() received nonzero return code 2 while executing 'ls /home/dbadmin/.ssh/user.pub'!
[[email protected]:22] sudo: mkdir -p /home/dbadmin/.ssh/
[[email protected]:22] put: /home/mklos/.ssh/id_rsa.pub -> /home/dbadmin/.ssh/user.pub
[[email protected]:22] sudo: cat /home/dbadmin/.ssh/user.pub >> /home/dbadmin/.ssh/authorized_keys
[[email protected]:22] run: /opt/vertica/bin/adminTools -t create_db -s 10.0.0.92 -d dw -p dw -l /etc/vertica/vlicense
[[email protected]:22] out: Database with 1 or 2 nodes cannot be k-safe and it may lose data if it crashes
[[email protected]:22] out: Distributing changes to cluster.
[[email protected]:22] out: 10.0.0.92 OK [vertica][(6, 1, 0)][000][x86_64]
[[email protected]:22] out: Creating database dw
[[email protected]:22] out: Node Status: v_dw_node0001: (DOWN)
[[email protected]:22] out: Node Status: v_dw_node0001: (INITIALIZING)
[[email protected]:22] out: Node Status: v_dw_node0001: (VALIDATING LICENSE)
[[email protected]:22] out: Node Status: v_dw_node0001: (UP)
[[email protected]:22] out: Creating database nodes
[[email protected]:22] out: Node Status: v_dw_node0001: (UP)
[[email protected]:22] out: Database dw created successfully.
Making sure cluster has 3 nodes
Instance:i-a53411d4
Cluster has 1 nodes, needs 2 more
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
Successfully created node in EC2
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
instance is pending
Successfully created node in EC2
Adding new nodes to cluster
[[email protected]:22] run: ssh-keyscan -H 10.0.0.92 >> ~/.ssh/known_hosts
[[email protected]:22] out: # 10.0.0.92 SSH-2.0-OpenSSH_5.3
[[email protected]:22] run: ssh-keyscan -H 10.0.0.67 >> ~/.ssh/known_hosts
[[email protected]:22] out: # 10.0.0.67 SSH-2.0-OpenSSH_5.3
[[email protected]:22] run: ssh-keyscan -H 10.0.0.108 >> ~/.ssh/known_hosts
[[email protected]:22] out: # 10.0.0.108 SSH-2.0-OpenSSH_5.3
[[email protected]:22] sudo: /opt/vertica/sbin/vcluster -s 10.0.0.92,10.0.0.67,10.0.0.108 -L /etc/vertica/vlicense -k /etc/vertica/aws.pem
[[email protected]:22] out: STEP 1 of 5: Building keyless ssh for dbadmin and copying to all nodes
[[email protected]:22] out: INFO: 22: Copying and resetting permissions to .ssh directory for: [email protected]
[[email protected]:22] out: INFO: 22: Copying and resetting permissions to .ssh directory for: [email protected]
[[email protected]:22] out: INFO: 22: Copying and resetting permissions to .ssh directory for: [email protected]
[[email protected]:22] out: STEP 2 of 5: Copying the Vertica license to all nodes
[[email protected]:22] out: STEP 3 of 5: Configuring spread and copying to all nodes
[[email protected]:22] out: Stopping spread daemon: [ OK ]
[[email protected]:22] out: Stopping spread daemon: [ OK ]
[[email protected]:22] out: Stopping spread daemon: [ OK ]
[[email protected]:22] out: Starting spread daemon: spread (pid 4027) is running...
[[email protected]:22] out: [ OK ]
[[email protected]:22] out: Starting spread daemon: spread (pid 1928) is running...
[[email protected]:22] out: [ OK ]
[[email protected]:22] out: Starting spread daemon: spread (pid 1912) is running...
[[email protected]:22] out: [ OK ]
[[email protected]:22] out: STEP 4 of 5: Configuring admintools.conf and copying to all nodes
[[email protected]:22] out: STEP 5 of 5: Restarting agent on all nodes
[[email protected]:22] out: Stopping vertica agent:
[[email protected]:22] out: starting agent
[[email protected]:22] out: OK for user: dbadmin
[[email protected]:22] out: Stopping vertica agent:
[[email protected]:22] out: starting agent
[[email protected]:22] out: OK for user: dbadmin
[[email protected]:22] out: Stopping vertica agent:
[[email protected]:22] out: starting agent
[[email protected]:22] out: OK for user: dbadmin
[[email protected]:22] out: INFO: 0: stitch completed successfully
Nodes added successfully!
Success!
Connect to the bootstrap node:
ssh -i ~/.aws/us-east-1.pem [email protected]
Connect to the database:
vsql -U dbadmin -w dw -h xxx.xxx.xxx.xxx -d dw
Done.
Disconnecting from xxx.xxx.xxx.xxx... done.
Disconnecting from [email protected]... done.