Ian Maxon | 9c40a66 | 2018-02-09 12:42:56 -0800 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <!-- |
| 3 | | Generated by Apache Maven Doxia at 2018-02-09 |
| 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="20180209" /> |
| 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 | |
| 22 | <script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| 23 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| 24 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| 25 | })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
| 26 | |
| 27 | ga('create', 'UA-41536543-1', 'uci.edu'); |
| 28 | ga('send', 'pageview');</script> |
| 29 | |
| 30 | </head> |
| 31 | <body class="topBarDisabled"> |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | <div class="container-fluid"> |
| 37 | <div id="banner"> |
| 38 | <div class="pull-left"> |
| 39 | <a href="./" id="bannerLeft"> |
| 40 | <img src="images/asterixlogo.png" alt="AsterixDB"/> |
| 41 | </a> |
| 42 | </div> |
| 43 | <div class="pull-right"> </div> |
| 44 | <div class="clear"><hr/></div> |
| 45 | </div> |
| 46 | |
| 47 | <div id="breadcrumbs"> |
| 48 | <ul class="breadcrumb"> |
| 49 | |
| 50 | |
| 51 | <li id="publishDate">Last Published: 2018-02-09</li> |
| 52 | |
| 53 | |
| 54 | |
| 55 | <li id="projectVersion" class="pull-right">Version: 0.9.3</li> |
| 56 | |
| 57 | <li class="divider pull-right">|</li> |
| 58 | |
| 59 | <li class="pull-right"> <a href="index.html" title="Documentation Home"> |
| 60 | Documentation Home</a> |
| 61 | </li> |
| 62 | |
| 63 | </ul> |
| 64 | </div> |
| 65 | |
| 66 | |
| 67 | <div class="row-fluid"> |
| 68 | <div id="leftColumn" class="span3"> |
| 69 | <div class="well sidebar-nav"> |
| 70 | |
| 71 | |
| 72 | <ul class="nav nav-list"> |
| 73 | <li class="nav-header">Get Started - Installation</li> |
| 74 | |
| 75 | <li> |
| 76 | |
| 77 | <a href="ncservice.html" title="Option 1: using NCService"> |
| 78 | <i class="none"></i> |
| 79 | Option 1: using NCService</a> |
| 80 | </li> |
| 81 | |
| 82 | <li class="active"> |
| 83 | |
| 84 | <a href="#"><i class="none"></i>Option 2: using Ansible</a> |
| 85 | </li> |
| 86 | |
| 87 | <li> |
| 88 | |
| 89 | <a href="aws.html" title="Option 3: using Amazon Web Services"> |
| 90 | <i class="none"></i> |
| 91 | Option 3: using Amazon Web Services</a> |
| 92 | </li> |
| 93 | |
| 94 | <li> |
| 95 | |
| 96 | <a href="yarn.html" title="Option 4: using YARN"> |
| 97 | <i class="none"></i> |
| 98 | Option 4: using YARN</a> |
| 99 | </li> |
| 100 | |
| 101 | <li> |
| 102 | |
| 103 | <a href="install.html" title="Option 5: using Managix (deprecated)"> |
| 104 | <i class="none"></i> |
| 105 | Option 5: using Managix (deprecated)</a> |
| 106 | </li> |
| 107 | <li class="nav-header">AsterixDB Primer</li> |
| 108 | |
| 109 | <li> |
| 110 | |
| 111 | <a href="sqlpp/primer-sqlpp.html" title="Option 1: using SQL++"> |
| 112 | <i class="none"></i> |
| 113 | Option 1: using SQL++</a> |
| 114 | </li> |
| 115 | |
| 116 | <li> |
| 117 | |
| 118 | <a href="aql/primer.html" title="Option 2: using AQL"> |
| 119 | <i class="none"></i> |
| 120 | Option 2: using AQL</a> |
| 121 | </li> |
| 122 | <li class="nav-header">Data Model</li> |
| 123 | |
| 124 | <li> |
| 125 | |
| 126 | <a href="datamodel.html" title="The Asterix Data Model"> |
| 127 | <i class="none"></i> |
| 128 | The Asterix Data Model</a> |
| 129 | </li> |
| 130 | <li class="nav-header">Queries - SQL++</li> |
| 131 | |
| 132 | <li> |
| 133 | |
| 134 | <a href="sqlpp/manual.html" title="The SQL++ Query Language"> |
| 135 | <i class="none"></i> |
| 136 | The SQL++ Query Language</a> |
| 137 | </li> |
| 138 | |
| 139 | <li> |
| 140 | |
| 141 | <a href="sqlpp/builtins.html" title="Builtin Functions"> |
| 142 | <i class="none"></i> |
| 143 | Builtin Functions</a> |
| 144 | </li> |
| 145 | <li class="nav-header">Queries - AQL</li> |
| 146 | |
| 147 | <li> |
| 148 | |
| 149 | <a href="aql/manual.html" title="The Asterix Query Language (AQL)"> |
| 150 | <i class="none"></i> |
| 151 | The Asterix Query Language (AQL)</a> |
| 152 | </li> |
| 153 | |
| 154 | <li> |
| 155 | |
| 156 | <a href="aql/builtins.html" title="Builtin Functions"> |
| 157 | <i class="none"></i> |
| 158 | Builtin Functions</a> |
| 159 | </li> |
| 160 | <li class="nav-header">API/SDK</li> |
| 161 | |
| 162 | <li> |
| 163 | |
| 164 | <a href="api.html" title="HTTP API"> |
| 165 | <i class="none"></i> |
| 166 | HTTP API</a> |
| 167 | </li> |
| 168 | |
| 169 | <li> |
| 170 | |
| 171 | <a href="csv.html" title="CSV Output"> |
| 172 | <i class="none"></i> |
| 173 | CSV Output</a> |
| 174 | </li> |
| 175 | <li class="nav-header">Advanced Features</li> |
| 176 | |
| 177 | <li> |
| 178 | |
| 179 | <a href="aql/fulltext.html" title="Support of Full-text Queries"> |
| 180 | <i class="none"></i> |
| 181 | Support of Full-text Queries</a> |
| 182 | </li> |
| 183 | |
| 184 | <li> |
| 185 | |
| 186 | <a href="aql/externaldata.html" title="Accessing External Data"> |
| 187 | <i class="none"></i> |
| 188 | Accessing External Data</a> |
| 189 | </li> |
| 190 | |
| 191 | <li> |
| 192 | |
| 193 | <a href="feeds/tutorial.html" title="Support for Data Ingestion"> |
| 194 | <i class="none"></i> |
| 195 | Support for Data Ingestion</a> |
| 196 | </li> |
| 197 | |
| 198 | <li> |
| 199 | |
| 200 | <a href="udf.html" title="User Defined Functions"> |
| 201 | <i class="none"></i> |
| 202 | User Defined Functions</a> |
| 203 | </li> |
| 204 | |
| 205 | <li> |
| 206 | |
| 207 | <a href="aql/filters.html" title="Filter-Based LSM Index Acceleration"> |
| 208 | <i class="none"></i> |
| 209 | Filter-Based LSM Index Acceleration</a> |
| 210 | </li> |
| 211 | |
| 212 | <li> |
| 213 | |
| 214 | <a href="aql/similarity.html" title="Support of Similarity Queries"> |
| 215 | <i class="none"></i> |
| 216 | Support of Similarity Queries</a> |
| 217 | </li> |
| 218 | </ul> |
| 219 | |
| 220 | |
| 221 | |
| 222 | <hr class="divider" /> |
| 223 | |
| 224 | <div id="poweredBy"> |
| 225 | <div class="clear"></div> |
| 226 | <div class="clear"></div> |
| 227 | <div class="clear"></div> |
| 228 | <a href="./" title="AsterixDB" class="builtBy"> |
| 229 | <img class="builtBy" alt="AsterixDB" src="images/asterixlogo.png" /> |
| 230 | </a> |
| 231 | </div> |
| 232 | </div> |
| 233 | </div> |
| 234 | |
| 235 | |
| 236 | <div id="bodyColumn" class="span9" > |
| 237 | |
| 238 | <!-- ! Licensed to the Apache Software Foundation (ASF) under one |
| 239 | ! or more contributor license agreements. See the NOTICE file |
| 240 | ! distributed with this work for additional information |
| 241 | ! regarding copyright ownership. The ASF licenses this file |
| 242 | ! to you under the Apache License, Version 2.0 (the |
| 243 | ! "License"); you may not use this file except in compliance |
| 244 | ! with the License. You may obtain a copy of the License at |
| 245 | ! |
| 246 | ! http://www.apache.org/licenses/LICENSE-2.0 |
| 247 | ! |
| 248 | ! Unless required by applicable law or agreed to in writing, |
| 249 | ! software distributed under the License is distributed on an |
| 250 | ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 251 | ! KIND, either express or implied. See the License for the |
| 252 | ! specific language governing permissions and limitations |
| 253 | ! under the License. |
| 254 | ! --> |
| 255 | <ul> |
| 256 | |
| 257 | <li><a href="#Introduction">Introduction</a></li> |
| 258 | |
| 259 | <li><a href="#Prerequisites">Prerequisites</a></li> |
| 260 | |
| 261 | <li><a href="#config">Cluster Configuration</a></li> |
| 262 | |
| 263 | <li><a href="#lifecycle">Cluster Lifecycle Management</a></li> |
| 264 | </ul> |
| 265 | <!-- ! Licensed to the Apache Software Foundation (ASF) under one |
| 266 | ! or more contributor license agreements. See the NOTICE file |
| 267 | ! distributed with this work for additional information |
| 268 | ! regarding copyright ownership. The ASF licenses this file |
| 269 | ! to you under the Apache License, Version 2.0 (the |
| 270 | ! "License"); you may not use this file except in compliance |
| 271 | ! with the License. You may obtain a copy of the License at |
| 272 | ! |
| 273 | ! http://www.apache.org/licenses/LICENSE-2.0 |
| 274 | ! |
| 275 | ! Unless required by applicable law or agreed to in writing, |
| 276 | ! software distributed under the License is distributed on an |
| 277 | ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 278 | ! KIND, either express or implied. See the License for the |
| 279 | ! specific language governing permissions and limitations |
| 280 | ! under the License. |
| 281 | ! --> |
| 282 | <div class="section"> |
| 283 | <h2><a name="Introduction" id="Introduction">Introduction</a></h2> |
| 284 | <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> |
| 285 | <div class="section"> |
| 286 | <h2><a name="Prerequisites" id="Prerequisites">Prerequisites</a></h2> |
| 287 | |
| 288 | <ul> |
| 289 | |
| 290 | <li> |
| 291 | <p>Supported operating systems: <b>Linux</b> and <b>MacOS</b></p></li> |
| 292 | |
| 293 | <li> |
| 294 | <p>Install pip on your client machine:</p> |
| 295 | <p>CentOS</p> |
| 296 | |
| 297 | <div class="source"> |
| 298 | <div class="source"> |
| 299 | <pre> $ sudo yum install python-pip |
| 300 | </pre></div></div> |
| 301 | <p>Ubuntu</p> |
| 302 | |
| 303 | <div class="source"> |
| 304 | <div class="source"> |
| 305 | <pre> $ sudo apt-get install python-pip |
| 306 | </pre></div></div> |
| 307 | <p>macOS</p> |
| 308 | |
| 309 | <div class="source"> |
| 310 | <div class="source"> |
| 311 | <pre> $ brew install pip |
| 312 | </pre></div></div></li> |
| 313 | |
| 314 | <li> |
| 315 | <p>Install Ansible, boto, and boto3 on your client machine:</p> |
| 316 | |
| 317 | <div class="source"> |
| 318 | <div class="source"> |
| 319 | <pre> $ pip install ansible |
| 320 | $ pip install boto |
| 321 | $ pip install boto3 |
| 322 | </pre></div></div> |
| 323 | <p>Note that you might need <tt>sudo</tt> depending on your system configuration.</p> |
| 324 | <p><b>Make sure that the version of Ansible is no less than 2.2.1.0</b>:</p> |
| 325 | |
| 326 | <div class="source"> |
| 327 | <div class="source"> |
| 328 | <pre> $ ansible --version |
| 329 | ansible 2.2.1.0 |
| 330 | </pre></div></div></li> |
| 331 | |
| 332 | <li> |
| 333 | <p>Download the AsterixDB distribution package, unzip it, and navigate to <tt>opt/ansible/</tt></p> |
| 334 | |
| 335 | <div class="source"> |
| 336 | <div class="source"> |
| 337 | <pre> $ cd opt/ansible |
| 338 | </pre></div></div> |
| 339 | <p>The following files and directories are in the directory <tt>opt/ansible</tt>:</p> |
| 340 | |
| 341 | <div class="source"> |
| 342 | <div class="source"> |
| 343 | <pre> README bin conf yaml |
| 344 | </pre></div></div> |
| 345 | <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> |
| 346 | </ul></div> |
| 347 | <div class="section"> |
| 348 | <h2><a name="Cluster_Configuration"></a><a name="config" id="config">Cluster Configuration</a></h2> |
| 349 | |
| 350 | <ul> |
| 351 | |
| 352 | <li> |
| 353 | <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> |
| 354 | |
| 355 | <div class="source"> |
| 356 | <div class="source"> |
| 357 | <pre> [cc] |
| 358 | 172.0.1.10 |
| 359 | |
| 360 | [ncs] |
| 361 | 172.0.1.11 |
| 362 | 172.0.1.12 |
| 363 | </pre></div></div> |
| 364 | <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> |
| 365 | |
| 366 | <div class="source"> |
| 367 | <div class="source"> |
| 368 | <pre> ;[all:vars] |
| 369 | ;ansible_ssh_user=<fill with your ssh account username> |
| 370 | </pre></div></div> |
| 371 | <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> |
| 372 | |
| 373 | <li> |
| 374 | <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> |
| 375 | </ul></div> |
| 376 | <div class="section"> |
| 377 | <h2><a name="Cluster_Lifecycle_Management"></a><a name="lifecycle" id="lifecycle">Cluster Lifecycle Management</a></h2> |
| 378 | |
| 379 | <ul> |
| 380 | |
| 381 | <li> |
| 382 | <p>Deploy the binary to all nodes:</p> |
| 383 | |
| 384 | <div class="source"> |
| 385 | <div class="source"> |
| 386 | <pre> $ bin/deploy.sh |
| 387 | </pre></div></div></li> |
| 388 | |
| 389 | <li> |
| 390 | <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> |
| 391 | |
| 392 | <li> |
| 393 | <p>Launch your AsterixDB cluster:</p> |
| 394 | |
| 395 | <div class="source"> |
| 396 | <div class="source"> |
| 397 | <pre> $ bin/start.sh |
| 398 | </pre></div></div> |
| 399 | <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> |
| 400 | |
| 401 | <li> |
| 402 | <p>If you want to stop the the multi-node AsterixDB cluster, run the following script:</p> |
| 403 | |
| 404 | <div class="source"> |
| 405 | <div class="source"> |
| 406 | <pre> $ bin/stop.sh |
| 407 | </pre></div></div></li> |
| 408 | |
| 409 | <li> |
| 410 | <p>If you want to remove the binary on all nodes, run the following script:</p> |
| 411 | |
| 412 | <div class="source"> |
| 413 | <div class="source"> |
| 414 | <pre> $ bin/erase.sh |
| 415 | </pre></div></div></li> |
| 416 | </ul></div> |
| 417 | </div> |
| 418 | </div> |
| 419 | </div> |
| 420 | |
| 421 | <hr/> |
| 422 | |
| 423 | <footer> |
| 424 | <div class="container-fluid"> |
| 425 | <div class="row span12">Copyright © 2018 |
| 426 | <a href="https://www.apache.org/">The Apache Software Foundation</a>. |
| 427 | All Rights Reserved. |
| 428 | |
| 429 | </div> |
| 430 | |
| 431 | <?xml version="1.0" encoding="UTF-8"?> |
| 432 | <div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache |
| 433 | feather logo, and the Apache AsterixDB project logo are either |
| 434 | registered trademarks or trademarks of The Apache Software |
| 435 | Foundation in the United States and other countries. |
| 436 | All other marks mentioned may be trademarks or registered |
| 437 | trademarks of their respective owners.</div> |
| 438 | |
| 439 | |
| 440 | </div> |
| 441 | </footer> |
| 442 | </body> |
| 443 | </html> |