Ian Maxon | 100cb80 | 2017-04-24 18:48:07 -0700 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <!-- |
| 3 | | Generated by Apache Maven Doxia at 2017-04-24 |
| 4 | | Rendered using Apache Maven Fluido Skin 1.3.0 |
| 5 | --> |
| 6 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 7 | <head> |
| 8 | <meta charset="UTF-8" /> |
| 9 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 10 | <meta name="Date-Revision-yyyymmdd" content="20170424" /> |
| 11 | <meta http-equiv="Content-Language" content="en" /> |
| 12 | <title>AsterixDB – </title> |
| 13 | <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" /> |
| 14 | <link rel="stylesheet" href="./css/site.css" /> |
| 15 | <link rel="stylesheet" href="./css/print.css" media="print" /> |
| 16 | |
| 17 | |
| 18 | <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script> |
| 19 | |
| 20 | |
| 21 | |
Ian Maxon | 100cb80 | 2017-04-24 18:48:07 -0700 | [diff] [blame] | 22 | |
Ian Maxon | 100cb80 | 2017-04-24 18:48:07 -0700 | [diff] [blame] | 23 | |
| 24 | </head> |
| 25 | <body class="topBarDisabled"> |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | <div class="container-fluid"> |
| 31 | <div id="banner"> |
| 32 | <div class="pull-left"> |
| 33 | <a href="./" id="bannerLeft"> |
| 34 | <img src="images/asterixlogo.png" alt="AsterixDB"/> |
| 35 | </a> |
| 36 | </div> |
| 37 | <div class="pull-right"> </div> |
| 38 | <div class="clear"><hr/></div> |
| 39 | </div> |
| 40 | |
| 41 | <div id="breadcrumbs"> |
| 42 | <ul class="breadcrumb"> |
| 43 | |
| 44 | |
| 45 | <li id="publishDate">Last Published: 2017-04-24</li> |
| 46 | |
| 47 | |
| 48 | |
| 49 | <li id="projectVersion" class="pull-right">Version: 0.9.1</li> |
| 50 | |
| 51 | <li class="divider pull-right">|</li> |
| 52 | |
| 53 | <li class="pull-right"> <a href="index.html" title="Documentation Home"> |
| 54 | Documentation Home</a> |
| 55 | </li> |
| 56 | |
| 57 | </ul> |
| 58 | </div> |
| 59 | |
| 60 | |
| 61 | <div class="row-fluid"> |
| 62 | <div id="leftColumn" class="span3"> |
| 63 | <div class="well sidebar-nav"> |
| 64 | |
| 65 | |
| 66 | <ul class="nav nav-list"> |
| 67 | <li class="nav-header">Get Started - Installation</li> |
| 68 | |
| 69 | <li> |
| 70 | |
| 71 | <a href="ncservice.html" title="Option 1: using NCService"> |
| 72 | <i class="none"></i> |
| 73 | Option 1: using NCService</a> |
| 74 | </li> |
| 75 | |
| 76 | <li class="active"> |
| 77 | |
| 78 | <a href="#"><i class="none"></i>Option 2: using Ansible</a> |
| 79 | </li> |
| 80 | |
| 81 | <li> |
| 82 | |
| 83 | <a href="aws.html" title="Option 3: using Amazon Web Services"> |
| 84 | <i class="none"></i> |
| 85 | Option 3: using Amazon Web Services</a> |
| 86 | </li> |
| 87 | |
| 88 | <li> |
| 89 | |
| 90 | <a href="yarn.html" title="Option 4: using YARN"> |
| 91 | <i class="none"></i> |
| 92 | Option 4: using YARN</a> |
| 93 | </li> |
| 94 | |
| 95 | <li> |
| 96 | |
| 97 | <a href="install.html" title="Option 5: using Managix (deprecated)"> |
| 98 | <i class="none"></i> |
| 99 | Option 5: using Managix (deprecated)</a> |
| 100 | </li> |
| 101 | <li class="nav-header">AsterixDB Primer</li> |
| 102 | |
| 103 | <li> |
| 104 | |
| 105 | <a href="sqlpp/primer-sqlpp.html" title="Option 1: using SQL++"> |
| 106 | <i class="none"></i> |
| 107 | Option 1: using SQL++</a> |
| 108 | </li> |
| 109 | |
| 110 | <li> |
| 111 | |
| 112 | <a href="aql/primer.html" title="Option 2: using AQL"> |
| 113 | <i class="none"></i> |
| 114 | Option 2: using AQL</a> |
| 115 | </li> |
| 116 | <li class="nav-header">Data Model</li> |
| 117 | |
| 118 | <li> |
| 119 | |
| 120 | <a href="datamodel.html" title="The Asterix Data Model"> |
| 121 | <i class="none"></i> |
| 122 | The Asterix Data Model</a> |
| 123 | </li> |
| 124 | <li class="nav-header">Queries - SQL++</li> |
| 125 | |
| 126 | <li> |
| 127 | |
| 128 | <a href="sqlpp/manual.html" title="The SQL++ Query Language"> |
| 129 | <i class="none"></i> |
| 130 | The SQL++ Query Language</a> |
| 131 | </li> |
| 132 | |
| 133 | <li> |
| 134 | |
| 135 | <a href="sqlpp/builtins.html" title="Builtin Functions"> |
| 136 | <i class="none"></i> |
| 137 | Builtin Functions</a> |
| 138 | </li> |
| 139 | <li class="nav-header">Queries - AQL</li> |
| 140 | |
| 141 | <li> |
| 142 | |
| 143 | <a href="aql/manual.html" title="The Asterix Query Language (AQL)"> |
| 144 | <i class="none"></i> |
| 145 | The Asterix Query Language (AQL)</a> |
| 146 | </li> |
| 147 | |
| 148 | <li> |
| 149 | |
| 150 | <a href="aql/builtins.html" title="Builtin Functions"> |
| 151 | <i class="none"></i> |
| 152 | Builtin Functions</a> |
| 153 | </li> |
| 154 | <li class="nav-header">API/SDK</li> |
| 155 | |
| 156 | <li> |
| 157 | |
| 158 | <a href="api.html" title="HTTP API"> |
| 159 | <i class="none"></i> |
| 160 | HTTP API</a> |
| 161 | </li> |
| 162 | |
| 163 | <li> |
| 164 | |
| 165 | <a href="csv.html" title="CSV Output"> |
| 166 | <i class="none"></i> |
| 167 | CSV Output</a> |
| 168 | </li> |
| 169 | <li class="nav-header">Advanced Features</li> |
| 170 | |
| 171 | <li> |
| 172 | |
| 173 | <a href="aql/fulltext.html" title="Support of Full-text Queries"> |
| 174 | <i class="none"></i> |
| 175 | Support of Full-text Queries</a> |
| 176 | </li> |
| 177 | |
| 178 | <li> |
| 179 | |
| 180 | <a href="aql/externaldata.html" title="Accessing External Data"> |
| 181 | <i class="none"></i> |
| 182 | Accessing External Data</a> |
| 183 | </li> |
| 184 | |
| 185 | <li> |
| 186 | |
| 187 | <a href="feeds/tutorial.html" title="Support for Data Ingestion"> |
| 188 | <i class="none"></i> |
| 189 | Support for Data Ingestion</a> |
| 190 | </li> |
| 191 | |
| 192 | <li> |
| 193 | |
| 194 | <a href="udf.html" title="User Defined Functions"> |
| 195 | <i class="none"></i> |
| 196 | User Defined Functions</a> |
| 197 | </li> |
| 198 | |
| 199 | <li> |
| 200 | |
| 201 | <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration"> |
| 202 | <i class="none"></i> |
| 203 | Filter-Based LSM Index Acceleration</a> |
| 204 | </li> |
| 205 | |
| 206 | <li> |
| 207 | |
| 208 | <a href="aql/similarity.html" title="Support of Similarity Queries"> |
| 209 | <i class="none"></i> |
| 210 | Support of Similarity Queries</a> |
| 211 | </li> |
| 212 | </ul> |
| 213 | |
| 214 | |
| 215 | |
| 216 | <hr class="divider" /> |
| 217 | |
| 218 | <div id="poweredBy"> |
| 219 | <div class="clear"></div> |
| 220 | <div class="clear"></div> |
| 221 | <div class="clear"></div> |
| 222 | <a href="./" title="AsterixDB" class="builtBy"> |
| 223 | <img class="builtBy" alt="AsterixDB" src="images/asterixlogo.png" /> |
| 224 | </a> |
| 225 | </div> |
| 226 | </div> |
| 227 | </div> |
| 228 | |
| 229 | |
| 230 | <div id="bodyColumn" class="span9" > |
| 231 | |
| 232 | <!-- ! Licensed to the Apache Software Foundation (ASF) under one |
| 233 | ! or more contributor license agreements. See the NOTICE file |
| 234 | ! distributed with this work for additional information |
| 235 | ! regarding copyright ownership. The ASF licenses this file |
| 236 | ! to you under the Apache License, Version 2.0 (the |
| 237 | ! "License"); you may not use this file except in compliance |
| 238 | ! with the License. You may obtain a copy of the License at |
| 239 | ! |
| 240 | ! http://www.apache.org/licenses/LICENSE-2.0 |
| 241 | ! |
| 242 | ! Unless required by applicable law or agreed to in writing, |
| 243 | ! software distributed under the License is distributed on an |
| 244 | ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 245 | ! KIND, either express or implied. See the License for the |
| 246 | ! specific language governing permissions and limitations |
| 247 | ! under the License. |
| 248 | ! --> |
| 249 | <ul> |
| 250 | |
| 251 | <li><a href="#Introduction">Introduction</a></li> |
| 252 | |
| 253 | <li><a href="#Prerequisites">Prerequisites</a></li> |
| 254 | |
| 255 | <li><a href="#config">Cluster Configuration</a></li> |
| 256 | |
| 257 | <li><a href="#lifecycle">Cluster Lifecycle Management</a></li> |
| 258 | </ul> |
| 259 | <!-- ! Licensed to the Apache Software Foundation (ASF) under one |
| 260 | ! or more contributor license agreements. See the NOTICE file |
| 261 | ! distributed with this work for additional information |
| 262 | ! regarding copyright ownership. The ASF licenses this file |
| 263 | ! to you under the Apache License, Version 2.0 (the |
| 264 | ! "License"); you may not use this file except in compliance |
| 265 | ! with the License. You may obtain a copy of the License at |
| 266 | ! |
| 267 | ! http://www.apache.org/licenses/LICENSE-2.0 |
| 268 | ! |
| 269 | ! Unless required by applicable law or agreed to in writing, |
| 270 | ! software distributed under the License is distributed on an |
| 271 | ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 272 | ! KIND, either express or implied. See the License for the |
| 273 | ! specific language governing permissions and limitations |
| 274 | ! under the License. |
| 275 | ! --> |
| 276 | <div class="section"> |
| 277 | <h2><a name="Introduction" id="Introduction">Introduction</a></h2> |
| 278 | <p>This installation option provides several wrapped <a class="externalLink" href="https://www.ansible.com/">Ansible</a>-based scripts to deploy, start, stop, and erase an AsterixDB instance on a multi-node cluster without requiring users to interact with each individual node in the cluster.</p></div> |
| 279 | <div class="section"> |
| 280 | <h2><a name="Prerequisites" id="Prerequisites">Prerequisites</a></h2> |
| 281 | |
| 282 | <ul> |
| 283 | |
| 284 | <li> |
| 285 | <p>Supported operating systems: <b>Linux</b> and <b>MacOS</b></p></li> |
| 286 | |
| 287 | <li> |
| 288 | <p>Install pip on your client machine:</p> |
| 289 | <p>CentOS</p> |
| 290 | |
| 291 | <div class="source"> |
| 292 | <div class="source"> |
| 293 | <pre> $ sudo yum install python-pip |
| 294 | </pre></div></div> |
| 295 | <p>Ubuntu</p> |
| 296 | |
| 297 | <div class="source"> |
| 298 | <div class="source"> |
| 299 | <pre> $ sudo apt-get install python-pip |
| 300 | </pre></div></div> |
| 301 | <p>macOS</p> |
| 302 | |
| 303 | <div class="source"> |
| 304 | <div class="source"> |
| 305 | <pre> $ brew install pip |
| 306 | </pre></div></div></li> |
| 307 | |
| 308 | <li> |
| 309 | <p>Install Ansible, boto, and boto3 on your client machine:</p> |
| 310 | |
| 311 | <div class="source"> |
| 312 | <div class="source"> |
| 313 | <pre> $ pip install ansible |
| 314 | $ pip install boto |
| 315 | $ pip install boto3 |
| 316 | </pre></div></div> |
| 317 | <p>Note that you might need <tt>sudo</tt> depending on your system configuration.</p> |
| 318 | <p><b>Make sure that the version of Ansible is no less than 2.2.1.0</b>:</p> |
| 319 | |
| 320 | <div class="source"> |
| 321 | <div class="source"> |
| 322 | <pre> $ ansible --version |
| 323 | ansible 2.2.1.0 |
| 324 | </pre></div></div></li> |
| 325 | |
| 326 | <li> |
| 327 | <p>Download the AsterixDB distribution package, unzip it, and navigate to <tt>opt/ansible/</tt></p> |
| 328 | |
| 329 | <div class="source"> |
| 330 | <div class="source"> |
| 331 | <pre> $ cd opt/ansible |
| 332 | </pre></div></div> |
| 333 | <p>The following files and directories are in the directory <tt>opt/ansible</tt>:</p> |
| 334 | |
| 335 | <div class="source"> |
| 336 | <div class="source"> |
| 337 | <pre> README bin conf yaml |
| 338 | </pre></div></div> |
| 339 | <p><tt>bin</tt> contains scripts that deploy, start, stop and erase a multi-node AsterixDB cluster, according to the configuration specified in files under <tt>conf</tt>, and <tt>yaml</tt> contains internal Ansible scripts that the shell scripts in <tt>bin</tt> use.</p></li> |
| 340 | </ul></div> |
| 341 | <div class="section"> |
| 342 | <h2><a name="Cluster_Configuration"></a><a name="config" id="config">Cluster Configuration</a></h2> |
| 343 | |
| 344 | <ul> |
| 345 | |
| 346 | <li> |
| 347 | <p><b>Nodes and account</b>. Edit the inventory file <tt>conf/inventory</tt> when necessary. You mostly only need to specify the node DNS names (or IPs) for the cluster controller, i.e., the master node, in the <b>[cc]</b> section, and node controllers, i.e., slave nodes, in the <b>[ncs]</b> section. The following example configures a cluster with two slave nodes (172.0.1.11 and 172.0.1.12) and one master node (172.0.1.10).</p> |
| 348 | |
| 349 | <div class="source"> |
| 350 | <div class="source"> |
| 351 | <pre> [cc] |
| 352 | 172.0.1.10 |
| 353 | |
| 354 | [ncs] |
| 355 | 172.0.1.11 |
| 356 | 172.0.1.12 |
| 357 | </pre></div></div> |
| 358 | <p><b>Configure passwordless ssh from your current client that runs the scripts to all nodes listed in <tt>conf/inventory</tt> as well as <tt>localhost</tt>.</b> If the ssh user account for target machines is different from your current username, please uncomment and edit the following two lines:</p> |
| 359 | |
| 360 | <div class="source"> |
| 361 | <div class="source"> |
| 362 | <pre> ;[all:vars] |
| 363 | ;ansible_ssh_user=<fill with your ssh account username> |
| 364 | </pre></div></div> |
| 365 | <p>If you want to specify advanced Ansible builtin variables, please refer to the <a class="externalLink" href="http://docs.ansible.com/ansible/intro_inventory.html">Ansible documentation</a>.</p></li> |
| 366 | |
| 367 | <li> |
| 368 | <p><b>Remote working directories</b>. Edit <tt>conf/instance_settings.yml</tt> to change the remote binary directory (the variable “binarydir”) when necessary. By default, the binary directory will be under the home directory (as the value of Ansible builtin variable ansible_env.HOME) of the ssh user account on each node.</p></li> |
| 369 | </ul></div> |
| 370 | <div class="section"> |
| 371 | <h2><a name="Cluster_Lifecycle_Management"></a><a name="lifecycle" id="lifecycle">Cluster Lifecycle Management</a></h2> |
| 372 | |
| 373 | <ul> |
| 374 | |
| 375 | <li> |
| 376 | <p>Deploy the binary to all nodes:</p> |
| 377 | |
| 378 | <div class="source"> |
| 379 | <div class="source"> |
| 380 | <pre> $ bin/deploy.sh |
| 381 | </pre></div></div></li> |
| 382 | |
| 383 | <li> |
| 384 | <p>Every time before starting the AsterixDB cluster, you can edit the instance configuration file <tt>conf/instance/cc.conf</tt>, except that IP addresses/DNS names are generated and cannot be changed. All available parameters and their usage can be found <a href="ncservice.html#Parameters">here</a>.</p></li> |
| 385 | |
| 386 | <li> |
| 387 | <p>Launch your AsterixDB cluster:</p> |
| 388 | |
| 389 | <div class="source"> |
| 390 | <div class="source"> |
| 391 | <pre> $ bin/start.sh |
| 392 | </pre></div></div> |
| 393 | <p>Now you can use the multi-node AsterixDB cluster by opening the master node listed in <tt>conf/inventory</tt> at port <tt>19001</tt> (which can be customized in <tt>conf/instance/cc.conf</tt>) in your browser.</p></li> |
| 394 | |
| 395 | <li> |
| 396 | <p>If you want to stop the the multi-node AsterixDB cluster, run the following script:</p> |
| 397 | |
| 398 | <div class="source"> |
| 399 | <div class="source"> |
| 400 | <pre> $ bin/stop.sh |
| 401 | </pre></div></div></li> |
| 402 | |
| 403 | <li> |
| 404 | <p>If you want to remove the binary on all nodes, run the following script:</p> |
| 405 | |
| 406 | <div class="source"> |
| 407 | <div class="source"> |
| 408 | <pre> $ bin/erase.sh |
| 409 | </pre></div></div></li> |
| 410 | </ul></div> |
| 411 | </div> |
| 412 | </div> |
| 413 | </div> |
| 414 | |
| 415 | <hr/> |
| 416 | |
| 417 | <footer> |
| 418 | <div class="container-fluid"> |
| 419 | <div class="row span12">Copyright © 2017 |
| 420 | <a href="https://www.apache.org/">The Apache Software Foundation</a>. |
| 421 | All Rights Reserved. |
| 422 | |
| 423 | </div> |
| 424 | |
| 425 | <?xml version="1.0" encoding="UTF-8"?> |
| 426 | <div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache |
| 427 | feather logo, and the Apache AsterixDB project logo are either |
| 428 | registered trademarks or trademarks of The Apache Software |
| 429 | Foundation in the United States and other countries. |
| 430 | All other marks mentioned may be trademarks or registered |
| 431 | trademarks of their respective owners.</div> |
| 432 | |
| 433 | |
| 434 | </div> |
| 435 | </footer> |
| 436 | </body> |
| 437 | </html> |