├── .gitignore ├── LICENSE ├── README.md ├── dataease ├── bin │ ├── dataease │ │ └── dataease.service │ ├── doris │ │ └── init.sql │ └── mysql │ │ └── init.sql ├── dectl ├── docker-compose-doris.yml ├── docker-compose-kettle.yml ├── docker-compose-mysql.yml ├── docker-compose.yml ├── install.conf ├── install.sh ├── logs │ └── README.md ├── templates │ ├── .kettle │ │ └── repositories.xml │ ├── be.conf │ ├── dataease.properties │ ├── fe.conf │ ├── my.cnf │ ├── mysql.env │ └── version └── uninstall.sh └── quick_start.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | *.iml 3 | target/ 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DataEase 离线安装包制作工程 2 | 3 | 本工程用来制作 DataEase 离线安装包。 4 | 5 | 如需下载 DataEase 安装包,请移步:https://community.fit2cloud.com/#/products/dataease/downloads 6 | -------------------------------------------------------------------------------- /dataease/bin/dataease/dataease.service: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # chkconfig: 2345 10 90 3 | # description: DATAEASE service 4 | 5 | function startDATAEASE 6 | { 7 | dectl reload 8 | } 9 | 10 | function stopDATAEASE 11 | { 12 | dectl uninstall 13 | } 14 | 15 | function restartDATAEASE 16 | { 17 | stopDATAEASE 18 | startDATAEASE 19 | } 20 | 21 | function statusDATAEASE 22 | { 23 | dectl status 24 | } 25 | 26 | export HOSTNAME=$HOSTNAME 27 | case "$1" in 28 | start) 29 | startDATAEASE 30 | ;; 31 | stop) 32 | stopDATAEASE 33 | ;; 34 | restart) 35 | restartDATAEASE 36 | ;; 37 | status) 38 | statusDATAEASE 39 | ;; 40 | *) 41 | echo "Usage: $0 {start|stop|restart|status}" 42 | ;; 43 | esac 44 | -------------------------------------------------------------------------------- /dataease/bin/doris/init.sql: -------------------------------------------------------------------------------- 1 | CREATE DATABASE IF NOT EXISTS dataease; 2 | SET PASSWORD FOR 'root' = PASSWORD('Password123@doris'); 3 | SET GLOBAL enable_spilling = true; -------------------------------------------------------------------------------- /dataease/bin/mysql/init.sql: -------------------------------------------------------------------------------- 1 | CREATE DATABASE `dataease` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -------------------------------------------------------------------------------- /dataease/dectl: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | action=$1 3 | target=$2 4 | args=$@ 5 | 6 | DE_BASE=/opt 7 | 8 | source ${DE_BASE}/dataease/.env 9 | 10 | export COMPOSE_HTTP_TIMEOUT=180 11 | 12 | compose_files="-f docker-compose.yml" 13 | 14 | compose_cmd="docker-compose" 15 | 16 | docker-compose version >/dev/null 2>&1 17 | if [ $? -ne 0 ]; then 18 | docker compose version >/dev/null 2>&1 19 | if [ $? -ne 0 ]; then 20 | compose_cmd="docker compose" 21 | fi 22 | fi 23 | 24 | 25 | if [ "${DE_ENGINE_MODE}" = "local" ]; then 26 | if [[ ! ${DE_EXTERNAL_KETTLE} ]] || [ ${DE_EXTERNAL_KETTLE} = "false" ]; then 27 | compose_files="${compose_files} -f docker-compose-kettle.yml" 28 | fi 29 | 30 | if [[ ! ${DE_EXTERNAL_DORIS} ]] || [ ${DE_EXTERNAL_DORIS} = "false" ]; then 31 | compose_files="${compose_files} -f docker-compose-doris.yml" 32 | fi 33 | fi 34 | 35 | if [[ ! ${DE_EXTERNAL_MYSQL} ]] || [ ${DE_EXTERNAL_MYSQL} = "false" ]; then 36 | compose_files="${compose_files} -f docker-compose-mysql.yml" 37 | fi 38 | 39 | function usage() { 40 | echo "DATAEASE 控制脚本" 41 | echo 42 | echo "Usage: " 43 | echo " ./dectl [COMMAND] [ARGS...]" 44 | echo " ./dectl --help" 45 | echo 46 | echo "Commands: " 47 | echo " status 查看 DATAEASE 服务运行状态" 48 | echo " start 启动 DATAEASE 服务" 49 | echo " stop 停止 DATAEASE 服务" 50 | echo " restart 重启 DATAEASE 服务" 51 | echo " reload 重新加载 DATAEASE 服务" 52 | echo " uninstall 卸载 DATAEASE 服务" 53 | echo " upgrade 升级 DATAEASE 服务" 54 | echo " version 查看 DATAEASE 版本信息" 55 | echo " clear-images 清理 DATAEASE 旧版本的相关镜像" 56 | echo " clear-logs 清理 DATAEASE 历史日志以及 Doris 临时日志" 57 | } 58 | function _healthcheck() { 59 | echo 60 | for b in {1..30} 61 | do 62 | sleep 3 63 | http_code=$(curl -sILw "%{http_code}\n" http://localhost:${DE_PORT} -o /dev/null) 64 | if [[ $http_code == 000 ]];then 65 | echo "DataEase 服务状态 : 正在启动" 66 | elif [[ $http_code == 200 ]];then 67 | echo "DataEase 服务状态 : 正常运行" 68 | break; 69 | else 70 | echo -e "DataEase 服务状态 : \033[31m无法访问\033[0m" 71 | exit 1 72 | fi 73 | done 74 | echo 75 | } 76 | function status() { 77 | echo 78 | echo "DataEase 容器运行状态" 79 | cd ${DE_BASE}/dataease; ${compose_cmd} ${compose_files} ps 80 | 81 | echo 82 | docker_root_dir=$(docker info | grep "Docker Root Dir" | awk -F': ' '{print $2}') 83 | echo "Docker 目录及文件大小 : " 84 | du -sh $docker_root_dir 85 | echo 86 | echo "Docker 目录所在磁盘使用情况 : " 87 | df -H $docker_root_dir 88 | 89 | echo 90 | echo "日志文件大小 : " 91 | du -Sh ${DE_BASE}/dataease/logs/ 92 | 93 | echo 94 | echo "DataEase 运行目录及文件大小 : " 95 | du -sh ${DE_BASE} 96 | echo 97 | echo "DataEase 运行目录使用情况 : " 98 | df -H ${DE_BASE} 99 | 100 | echo 101 | read available_disk percent_disk<<< $(df -H --output=avail,pcent ${DE_BASE} | tail -1) 102 | available_disk=${available_disk%?} 103 | percent_disk=${percent_disk%?} 104 | if [[ $available_disk < 2.0 ]] && [[ $percent_disk > 85 ]];then 105 | echo -e "\033[31m[警告] DataEase 运行目录所在磁盘剩余空间不足 2G 且磁盘使用率超过 85%,Apache Doris 可能无法正常启动!\033[0m" 106 | fi 107 | 108 | _healthcheck 109 | } 110 | function start() { 111 | echo 112 | cd ${DE_BASE}/dataease; ${compose_cmd} ${compose_files} start ${target} 113 | _healthcheck 114 | } 115 | function stop() { 116 | echo 117 | cd ${DE_BASE}/dataease; ${compose_cmd} ${compose_files} stop ${target} 118 | } 119 | function restart() { 120 | echo 121 | cd ${DE_BASE}/dataease; ${compose_cmd} ${compose_files} restart ${target} 122 | _healthcheck 123 | } 124 | function reload() { 125 | echo 126 | cd ${DE_BASE}/dataease; ${compose_cmd} ${compose_files} up -d 127 | _healthcheck 128 | } 129 | function uninstall() { 130 | echo 131 | cd ${DE_BASE}/dataease; ${compose_cmd} ${compose_files} down -v ${target} 132 | } 133 | function version() { 134 | echo 135 | de_version=$(grep "^ image:.*/dataease:" ${DE_BASE}/dataease/docker-compose.yml | awk -F'dataease:' '{print $2}') 136 | echo $de_version 137 | } 138 | function _clear_component_docker_images() { 139 | component=$1 140 | compose_file=${DE_BASE}/dataease/docker-compose-${component}.yml 141 | if [ $1 = "dataease" ];then 142 | compose_file=${DE_BASE}/dataease/docker-compose.yml 143 | fi 144 | component_image_defined=$(grep "^ image:.*/$component:" ${compose_file} | uniq) 145 | component_version=$(echo ${component_image_defined} | awk -F"${component}:" '{print $2}' | uniq) 146 | component_image=$(echo ${component_image_defined} | awk -F'image: ' '{print $2}' | awk -F':' '{print $1}') 147 | 148 | if test -z $(docker images | grep "dataease" | grep "$component_image" | grep -v " $component_version "); then 149 | echo "$component_image 不存在旧版本镜像" 150 | else 151 | echo "清理${component}镜像" 152 | docker rmi $(docker images | grep "dataease" | grep "$component_image" | grep -v " $component_version " | awk -F' ' '{print $1":"$2}') 153 | echo "清理完毕" 154 | fi 155 | } 156 | function clear_images() { 157 | echo 158 | _clear_component_docker_images 'dataease' 159 | _clear_component_docker_images 'doris' 160 | _clear_component_docker_images 'kettle' 161 | _clear_component_docker_images 'mysql' 162 | if test ! -z "$(docker images -f dangling=true -q)"; then 163 | echo "清理虚悬镜像" 164 | docker rmi $(docker images -f dangling=true -q) 165 | echo "清理完毕" 166 | fi 167 | } 168 | function clear_logs() { 169 | echo "开始清理 DataEase 历史日志" 170 | rm -rf ${DE_BASE}/dataease/logs/dataease/history/* 171 | echo "清理完毕" 172 | 173 | echo "开始清理 Apache Doris FE 日志" 174 | rm -rf ${DE_BASE}/dataease/logs/fe/fe.gc.log.* 175 | echo "" > ${DE_BASE}/dataease/logs/fe/fe.out 176 | echo "清理完毕" 177 | 178 | echo "开始清理 Apache Doris BE 日志" 179 | echo "" > ${DE_BASE}/dataease/logs/be/be.INFO 180 | echo "" > ${DE_BASE}/dataease/logs/be/be.WARNING 181 | echo "" > ${DE_BASE}/dataease/logs/be/be.out 182 | echo "清理完毕" 183 | } 184 | function upgrade() { 185 | echo 186 | git_urls=('gitee.com' 'github.com') 187 | if [[ -x "$(command -v python)" ]];then 188 | py_cmd='python' 189 | elif [[ -x "$(command -v python3)" ]]; then 190 | py_cmd='python3' 191 | else 192 | git_urls=('github.com') 193 | fi 194 | 195 | for git_url in ${git_urls[*]} 196 | do 197 | success="true" 198 | for i in {1..3} 199 | do 200 | echo -ne "检测 ${git_url} ... ${i} " 201 | curl -m 5 -kIs https://${git_url} >/dev/null 202 | if [ $? != 0 ];then 203 | echo "failed" 204 | success="false" 205 | break 206 | else 207 | echo "ok" 208 | fi 209 | done 210 | if [[ ${success} == "true" ]];then 211 | server_url=${git_url} 212 | break 213 | fi 214 | done 215 | 216 | if [[ "x${server_url}" == "x" ]];then 217 | echo "没有找到稳定的下载服务器,请稍候重试" 218 | exit 1 219 | fi 220 | 221 | if [[ "${server_url}" == "gitee.com" ]];then 222 | owner='fit2cloud-feizhiyun' 223 | repo='DataEase' 224 | gitee_release_content=$(curl -s https://gitee.com/api/v5/repos/${owner}/${repo}/releases/latest) 225 | # export LC_ALL="en_US.utf8" 226 | latest_version=$($py_cmd -c "import json; obj=json.loads('$gitee_release_content', strict=False); print(obj['tag_name']);") 227 | else 228 | owner='dataease' 229 | repo='dataease' 230 | latest_version=$(curl -s https://api.github.com/repos/${owner}/${repo}/releases/latest | grep -e "\"tag_name\"" | sed -r 's/.*: "(.*)",/\1/') 231 | fi 232 | 233 | current_version=$(grep "^ image:.*/dataease:" ${DE_BASE}/dataease/docker-compose.yml | awk -F'dataease:' '{print $2}') 234 | 235 | if [ "${latest_version}" = "" ];then 236 | echo "未获取到最新版本" 237 | exit 1 238 | elif [ "${latest_version}" = "${current_version}" ];then 239 | echo "最新版本与当前版本一致,退出升级过程" 240 | exit 0 241 | else 242 | echo -e "\e[32m 检测到最新版本为\e[1;33m${latest_version}\e[0;32m 即将执行在线升级...\e[0m" 243 | fi 244 | sleep 2s 245 | 246 | echo "使用下载服务器 ${server_url}" 247 | cd /tmp 248 | download_url="https://${server_url}/${owner}/${repo}/releases/download/${latest_version}/dataease-${latest_version}-online.tar.gz" 249 | curl -LOk -m 60 -o dataease-${latest_version}-online.tar.gz $download_url 250 | if [ $? -ne 0 ]; then 251 | echo -e "\e[31m升级失败:连接下载服务器超时!\n可手动下载升级包,然后执行\e[1;33m /bin/bash install.sh \e[0;31m离线升级,也可以重新执行一次 dectl upgrade 命令。\e[0m" 252 | return 2 253 | fi 254 | 255 | if [ ! -f dataease-${latest_version}-online.tar.gz ];then 256 | echo "下载在线安装包失败,请试试重新执行一次安装命令。" 257 | exit 1 258 | fi 259 | 260 | tar zxvf dataease-${latest_version}-online.tar.gz 261 | if [ $? != 0 ];then 262 | echo "下载在线安装包失败,请试试重新执行一次安装命令。" 263 | rm -f dataease-${latest_version}-online.tar.gz 264 | exit 1 265 | fi 266 | 267 | cd dataease-${latest_version}-online 268 | /bin/bash install.sh 269 | 270 | cd .. 271 | rm -rf /tmp/dataease-${latest_version}-online 272 | } 273 | 274 | function main() { 275 | case "${action}" in 276 | status) 277 | status 278 | ;; 279 | start) 280 | start 281 | ;; 282 | stop) 283 | stop 284 | ;; 285 | restart) 286 | restart 287 | ;; 288 | reload) 289 | reload 290 | ;; 291 | uninstall) 292 | uninstall 293 | ;; 294 | upgrade) 295 | upgrade 296 | ;; 297 | version) 298 | version 299 | ;; 300 | clear-images) 301 | clear_images 302 | ;; 303 | clear-logs) 304 | clear_logs 305 | ;; 306 | help) 307 | usage 308 | ;; 309 | --help) 310 | usage 311 | ;; 312 | *) 313 | echo "不支持的参数,请使用 help 或 --help 参数获取帮助" 314 | ;; 315 | esac 316 | } 317 | main -------------------------------------------------------------------------------- /dataease/docker-compose-doris.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | services: 3 | 4 | doris-fe: 5 | image: registry.cn-qingdao.aliyuncs.com/dataease/doris:v1.2.4.1-0606 6 | container_name: doris-fe 7 | privileged: true 8 | environment: 9 | - DORIS_ROLE=fe-leader 10 | - FE_SERVERS=fe1:${DE_DORIS_FE_IP}:9010 11 | - FE_ID=1 12 | volumes: 13 | - ${DE_BASE}/dataease/data/fe:/opt/apache-doris/fe/doris-meta 14 | - ${DE_BASE}/dataease/logs/fe:/opt/apache-doris/fe/log 15 | - ${DE_BASE}/dataease/conf/fe.conf:/opt/apache-doris/fe/conf/fe.conf 16 | networks: 17 | dataease-network : 18 | ipv4_address: ${DE_DORIS_FE_IP} 19 | restart: always 20 | healthcheck: 21 | test: [ "CMD-SHELL", "curl -sS 127.0.0.1:8030 || exit 1" ] 22 | interval: 10s 23 | timeout: 5s 24 | retries: 3 25 | 26 | doris-be: 27 | image: registry.cn-qingdao.aliyuncs.com/dataease/doris:v1.2.4.1-0606 28 | container_name: doris-be 29 | privileged: true 30 | environment: 31 | - DORIS_ROLE=be 32 | - FE_SERVERS=fe1:${DE_DORIS_FE_IP}:9010 33 | - BE_ADDR=${DE_DORIS_BE_IP}:9050 34 | volumes: 35 | - ${DE_BASE}/dataease/data/be:/opt/apache-doris/be/storage 36 | - ${DE_BASE}/dataease/logs/be:/opt/apache-doris/be/log 37 | - ${DE_BASE}/dataease/conf/be.conf:/opt/apache-doris/be/conf/be.conf 38 | - ${DE_BASE}/dataease/bin/doris:/docker-entrypoint-initdb.d/ 39 | depends_on: 40 | doris-fe: 41 | condition: service_healthy 42 | networks: 43 | dataease-network : 44 | ipv4_address: ${DE_DORIS_BE_IP} 45 | restart: always 46 | healthcheck: 47 | test: [ "CMD-SHELL", "curl -sS 127.0.0.1:8040 || exit 1" ] 48 | interval: 10s 49 | timeout: 5s 50 | retries: 3 -------------------------------------------------------------------------------- /dataease/docker-compose-kettle.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | services: 3 | 4 | kettle: 5 | image: registry.cn-qingdao.aliyuncs.com/dataease/kettle:v8.3-0318 6 | container_name: kettle 7 | environment: 8 | - PENTAHO_DI_JAVA_OPTIONS=-Xms1024m -Xmx4096m -XX:MaxPermSize=256m -Dfile.encoding=utf-8 9 | volumes: 10 | - ${DE_BASE}/dataease/conf/:/opt/dataease/conf 11 | - ${DE_BASE}/dataease/data/kettle:/opt/dataease/data/kettle 12 | networks: 13 | - dataease-network 14 | restart: always -------------------------------------------------------------------------------- /dataease/docker-compose-mysql.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | services: 3 | 4 | mysql: 5 | image: registry.cn-qingdao.aliyuncs.com/dataease/mysql:5.7.41 6 | container_name: mysql 7 | healthcheck: 8 | test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u${DE_MYSQL_USER}", "-p${DE_MYSQL_PASSWORD}"] 9 | interval: 5s 10 | timeout: 3s 11 | retries: 10 12 | env_file: 13 | - ${DE_BASE}/dataease/conf/mysql.env 14 | ports: 15 | - ${DE_MYSQL_PORT}:3306 16 | volumes: 17 | - ${DE_BASE}/dataease/conf/my.cnf:/etc/mysql/conf.d/my.cnf 18 | - ${DE_BASE}/dataease/bin/mysql:/docker-entrypoint-initdb.d/ 19 | - ${DE_BASE}/dataease/data/mysql:/var/lib/mysql 20 | networks: 21 | - dataease-network -------------------------------------------------------------------------------- /dataease/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | services: 3 | 4 | dataease: 5 | image: registry.cn-qingdao.aliyuncs.com/dataease/dataease:DE_TAG 6 | container_name: dataease 7 | ports: 8 | - ${DE_PORT}:8081 9 | mem_limit: 4096m 10 | volumes: 11 | - ${DE_BASE}/dataease/conf:/opt/dataease/conf 12 | - ${DE_BASE}/dataease/logs:/opt/dataease/logs 13 | - ${DE_BASE}/dataease/plugins/thirdpart:/opt/dataease/plugins/thirdpart 14 | - ${DE_BASE}/dataease/data/kettle:/opt/dataease/data/kettle 15 | - ${DE_BASE}/dataease/data/static-resource:/opt/dataease/data/static-resource 16 | - ${DE_BASE}/dataease/custom-drivers:/opt/dataease/custom-drivers 17 | - ${DE_BASE}/dataease/data/custom:/opt/dataease/data/custom 18 | - ${DE_BASE}/dataease/data/business:/opt/dataease/data/business 19 | - ${DE_BASE}/dataease/data/ehcache:/opt/dataease/data/ehcache 20 | shm_size: 1gb 21 | depends_on: 22 | mysql: 23 | condition: service_healthy 24 | networks: 25 | - dataease-network 26 | 27 | networks: 28 | dataease-network: 29 | driver: bridge 30 | ipam: 31 | driver: default 32 | config: 33 | - subnet: ${DE_DOCKER_SUBNET} 34 | gateway: ${DE_DOCKER_GATEWAY} 35 | -------------------------------------------------------------------------------- /dataease/install.conf: -------------------------------------------------------------------------------- 1 | # 基础配置 2 | ## 安装目录 3 | DE_BASE=/opt 4 | ## Service 端口 5 | DE_PORT=80 6 | ## 部署及运行模式,可选值有 local、simple、cluster,分别对应 本地模式、精简模式、集群模式 7 | DE_ENGINE_MODE=simple 8 | ## docker 网段设置 9 | DE_DOCKER_SUBNET=172.19.0.0/16 10 | ## docker 网关 IP 11 | DE_DOCKER_GATEWAY=172.19.0.1 12 | ## Apache Doris FE IP (外部 Doris 此参数无效) 13 | DE_DORIS_FE_IP=172.19.0.198 14 | ## Apache Doris BE IP (外部 Doris 此参数无效) 15 | DE_DORIS_BE_IP=172.19.0.199 16 | ## 登录超时时间,单位min。如果不设置则默认8小时,也就是480 17 | DE_LOGIN_TIMEOUT=480 18 | 19 | # 数据库配置 20 | ## 是否使用外部数据库 21 | DE_EXTERNAL_MYSQL=false 22 | ## 数据库地址 23 | DE_MYSQL_HOST=mysql 24 | ## 数据库端口 25 | DE_MYSQL_PORT=3306 26 | ## DataEase 数据库库名 27 | DE_MYSQL_DB=dataease 28 | ## 数据库用户名 29 | DE_MYSQL_USER=root 30 | ## 数据库密码 31 | DE_MYSQL_PASSWORD=Password123@mysql 32 | ## 数据库参数 33 | DE_MYSQL_PARAMS="autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false" 34 | 35 | # Apache Doris 配置 36 | ## 是否使用外部 Apache Doris 37 | DE_EXTERNAL_DORIS=false 38 | ## Doris 地址 39 | DE_DORIS_HOST=doris-fe 40 | ## Doris 查询连接端口 41 | DE_DORIS_PORT=9030 42 | ## Doris http端口 43 | DE_DORIS_HTTPPORT=8030 44 | ## Doris 数据库名称 45 | DE_DORIS_DB=dataease 46 | ## Doris 用户名 47 | DE_DORIS_USER=root 48 | ## Doris 密码 49 | DE_DORIS_PASSWORD=Password123@doris 50 | 51 | # Kettle 配置 52 | ## 是否使用外部 Kettle - (目前还不支持外部Kettle,除非不需运行Kettle,否则请不要修改此参数) 53 | DE_EXTERNAL_KETTLE=false 54 | ## Kettle 服务器地址 55 | DE_CARTE_HOST=kettle 56 | ## Kettle 访问端口 57 | DE_CARTE_PORT=18080 58 | ## Kettle 用户名 59 | DE_CARTE_USER=cluster 60 | ## Kettle 密码 61 | DE_CARTE_PASSWORD=cluster 62 | -------------------------------------------------------------------------------- /dataease/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CURRENT_DIR=$( 4 | cd "$(dirname "$0")" 5 | pwd 6 | ) 7 | 8 | function log() { 9 | message="[DATAEASE Log]: $1 " 10 | echo -e "${message}" 2>&1 | tee -a ${CURRENT_DIR}/install.log 11 | } 12 | 13 | args=$@ 14 | os=$(uname -a) 15 | docker_config_folder="/etc/docker" 16 | compose_files="-f docker-compose.yml" 17 | 18 | INSTALL_TYPE='install' 19 | if [ -f /usr/bin/dectl ]; then 20 | # 获取已安装的 DataEase 的运行目录 21 | DE_BASE=$(grep "^DE_BASE=" /usr/bin/dectl | cut -d'=' -f2) 22 | dectl uninstall 23 | INSTALL_TYPE='upgrade' 24 | fi 25 | 26 | set -a 27 | if [[ $DE_BASE ]] && [[ -f $DE_BASE/dataease/.env ]]; then 28 | source $DE_BASE/dataease/.env 29 | INSTALL_TYPE='upgrade' 30 | else 31 | source ${CURRENT_DIR}/install.conf 32 | INSTALL_TYPE='install' 33 | fi 34 | set +a 35 | 36 | DE_RUN_BASE=$DE_BASE/dataease 37 | conf_folder=${DE_RUN_BASE}/conf 38 | templates_folder=${DE_RUN_BASE}/templates 39 | mysql_container_name="mysql" 40 | if [ -f ${DE_RUN_BASE}/docker-compose-mysql.yml ]; then 41 | mysql_container_name=$(grep "container_name" ${DE_RUN_BASE}/docker-compose-mysql.yml | awk -F': ' '{print $2}') 42 | fi 43 | 44 | dataease_conf=${conf_folder}/dataease.properties 45 | 46 | function prop { 47 | [ -f "$1" ] | grep -P "^\s*[^#]?${2}=.*$" $1 | cut -d'=' -f2 48 | } 49 | 50 | if [ "x${DE_ENGINE_MODE}" = "x" ]; then 51 | export DE_ENGINE_MODE="local" 52 | fi 53 | 54 | if [ "x${DE_DOCKER_SUBNET}" = "x" ]; then 55 | export DE_DOCKER_SUBNET=$(grep "^[[:blank:]]*- subnet" ${DE_RUN_BASE}/docker-compose.yml | awk -F': ' '{print $2}') 56 | fi 57 | 58 | if [ "x${DE_DOCKER_GATEWAY}" = "x" ]; then 59 | export DE_DOCKER_GATEWAY=$(grep "^[[:blank:]]*gateway" ${DE_RUN_BASE}/docker-compose.yml | awk -F': ' '{print $2}') 60 | fi 61 | 62 | if [ "x${DE_DORIS_FE_IP}" = "x" ]; then 63 | DE_DORIS_FE_IP=$(grep "^[[:blank:]]*ipv4_address" ${DE_RUN_BASE}/docker-compose-doris.yml | awk -F': ' '{print $2}' | head -n 1) 64 | export DE_DORIS_FE_IP 65 | fi 66 | 67 | if [ "x${DE_DORIS_BE_IP}" = "x" ]; then 68 | DE_DORIS_BE_IP=$(grep "^[[:blank:]]*ipv4_address" ${DE_RUN_BASE}/docker-compose-doris.yml | awk -F': ' '{print $2}' | tail -n 1) 69 | export DE_DORIS_BE_IP 70 | fi 71 | 72 | echo -e "*******************************************************\n" 2>&1 | tee -a ${CURRENT_DIR}/install.log 73 | echo -e " 当前部署模式为 ${DE_ENGINE_MODE},如需切换模式,\n 请修改 $DE_BASE/dataease/.env 中的 DE_ENGINE_MODE 变量后,\n 重新执行 bash install.sh 即可\n" 2>&1 | tee -a ${CURRENT_DIR}/install.log 74 | echo -e "*******************************************************\n" 2>&1 | tee -a ${CURRENT_DIR}/install.log 75 | 76 | if [[ -f $dataease_conf ]]; then 77 | DE_LOGIN_TIMEOUT=$(prop $dataease_conf dataease.login_timeout) 78 | DE_MYSQL_PARAMS=$(grep -P "^\s*[^#]?spring.datasource.url=.*$" $dataease_conf | cut -d'=' --complement -f1 | awk -F'?' '{print $2}') 79 | fi 80 | export DE_MYSQL_PARAMS 81 | export DE_LOGIN_TIMEOUT=$([[ -z $DE_LOGIN_TIMEOUT ]] && echo -n 480 || echo -n $DE_LOGIN_TIMEOUT) 82 | 83 | if [[ -f $dataease_conf ]] && [[ ! ${DE_EXTERNAL_DORIS} ]]; then 84 | export DE_DORIS_DB=$(prop $dataease_conf doris.db) 85 | export DE_DORIS_USER=$(prop $dataease_conf doris.user) 86 | export DE_DORIS_PASSWORD=$(prop $dataease_conf doris.password) 87 | export DE_DORIS_HOST=$(prop $dataease_conf doris.host) 88 | export DE_DORIS_PORT=$(prop $dataease_conf doris.port) 89 | export DE_DORIS_HTTPPORT=$(prop $dataease_conf doris.httpPort) 90 | 91 | if [ ${DE_DORIS_HOST} = "doris-fe" ]; then 92 | export DE_EXTERNAL_DORIS="false" 93 | else 94 | export DE_EXTERNAL_DORIS="true" 95 | fi 96 | fi 97 | 98 | if [ ${DE_EXTERNAL_DORIS} = "false" ] && [ ${DE_ENGINE_MODE} = "local" ]; then 99 | compose_files="${compose_files} -f docker-compose-doris.yml" 100 | fi 101 | 102 | if [[ -f $dataease_conf ]] && [[ ! ${DE_EXTERNAL_KETTLE} ]]; then 103 | export DE_CARTE_HOST=$(prop $dataease_conf carte.host) 104 | export DE_CARTE_PORT=$(prop $dataease_conf carte.port) 105 | export DE_CARTE_USER=$(prop $dataease_conf carte.user) 106 | export DE_CARTE_PASSWORD=$(prop $dataease_conf carte.passwd) 107 | 108 | if [ ${DE_CARTE_HOST} = "kettle" ]; then 109 | export DE_EXTERNAL_KETTLE="false" 110 | else 111 | export DE_EXTERNAL_KETTLE="true" 112 | fi 113 | fi 114 | 115 | if [ ${DE_EXTERNAL_KETTLE} = "false" ] && [ ${DE_ENGINE_MODE} = "local" ]; then 116 | compose_files="${compose_files} -f docker-compose-kettle.yml" 117 | fi 118 | 119 | 120 | echo -e "======================= 开始安装 =======================" 2>&1 | tee -a ${CURRENT_DIR}/install.log 121 | 122 | keep_doris="false" 123 | if [[ -f ${DE_RUN_BASE}/docker-compose-doris.yml ]]; then 124 | current_doris_version=$(grep '^ image:' ${DE_RUN_BASE}/docker-compose-doris.yml | head -1 | cut -d ':' -f3) 125 | if [[ ! $current_doris_version =~ "v1.2.4" ]]; then 126 | echo "不升级doris,备份 docker-compose-doris.yml 文件" 127 | keep_doris="true" 128 | \cp ${DE_RUN_BASE}/docker-compose-doris.yml ${DE_RUN_BASE}/docker-compose-doris.yml.bak 129 | fi 130 | fi 131 | 132 | mkdir -p ${DE_RUN_BASE} 133 | 134 | 135 | read available_disk <<< $(df -m --output=avail ${DE_RUN_BASE} | tail -1) 136 | if [[ $available_disk -lt 20480 ]];then 137 | log "\033[31m[警告] DataEase 运行目录所在磁盘剩余空间不足 20G 可能无法正常启动!\033[0m" 138 | fi 139 | 140 | cp -r ./dataease/* ${DE_RUN_BASE}/ 141 | 142 | cd $DE_RUN_BASE 143 | env | grep DE_ >.env 144 | 145 | mkdir -p $conf_folder 146 | mkdir -p ${DE_RUN_BASE}/data/kettle 147 | mkdir -p ${DE_RUN_BASE}/data/fe 148 | mkdir -p ${DE_RUN_BASE}/data/be 149 | mkdir -p ${DE_RUN_BASE}/data/mysql 150 | mkdir -p ${DE_RUN_BASE}/data/static-resource 151 | mkdir -p ${DE_RUN_BASE}/custom-drivers 152 | mkdir -p ${DE_RUN_BASE}/data/business 153 | 154 | 155 | if [ ${keep_doris} = "true" ]; then 156 | \mv ${DE_RUN_BASE}/docker-compose-doris.yml.bak ${DE_RUN_BASE}/docker-compose-doris.yml 157 | fi 158 | 159 | DE_MYSQL_HOST_ORIGIN=$DE_MYSQL_HOST 160 | DE_MYSQL_PORT_ORIGIN=$DE_MYSQL_PORT 161 | 162 | if [ ${DE_EXTERNAL_MYSQL} = "false" ]; then 163 | compose_files="${compose_files} -f docker-compose-mysql.yml" 164 | export DE_MYSQL_HOST=$mysql_container_name 165 | export DE_MYSQL_PORT=3306 166 | sed -i "s/^ container_name: mysql/ container_name: ${DE_MYSQL_HOST}/g" docker-compose-mysql.yml 167 | else 168 | sed -i -e "/^ depends_on/,+2d" docker-compose.yml 169 | fi 170 | 171 | log "拷贝配置文件模板文件 -> $conf_folder" 172 | if [[ -f $dataease_conf ]]; then 173 | grep "redis" $dataease_conf >> $templates_folder/dataease.properties 174 | fi 175 | cd $DE_RUN_BASE 176 | cp -r $templates_folder/* $conf_folder 177 | cp -r $templates_folder/.kettle $conf_folder 178 | 179 | log "根据安装配置参数调整配置文件" 180 | cd ${templates_folder} 181 | templates_files=( dataease.properties mysql.env ) 182 | for i in ${templates_files[@]}; do 183 | if [ -f $i ]; then 184 | envsubst < $i > $conf_folder/$i 185 | fi 186 | done 187 | 188 | export DE_MYSQL_HOST=$DE_MYSQL_HOST_ORIGIN 189 | export DE_MYSQL_PORT=$DE_MYSQL_PORT_ORIGIN 190 | 191 | cd ${CURRENT_DIR} 192 | sed -i -e "s#DE_BASE=.*#DE_BASE=${DE_BASE}#g" dectl 193 | \cp dectl /usr/local/bin && chmod +x /usr/local/bin/dectl 194 | if [ ! -f /usr/bin/dectl ]; then 195 | ln -s /usr/local/bin/dectl /usr/bin/dectl 2>/dev/null 196 | fi 197 | 198 | echo "time: $(date)" 199 | 200 | if which getenforce && [ $(getenforce) == "Enforcing" ];then 201 | log "... 关闭 SELINUX" 202 | setenforce 0 203 | sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config 204 | fi 205 | 206 | #Install docker & docker-compose 207 | ##Install Latest Stable Docker Release 208 | if which docker >/dev/null 2>&1; then 209 | log "检测到 Docker 已安装,跳过安装步骤" 210 | log "启动 Docker " 211 | service docker start 2>&1 | tee -a ${CURRENT_DIR}/install.log 212 | else 213 | if [[ -d docker ]]; then 214 | log "... 离线安装 docker" 215 | cp docker/bin/* /usr/bin/ 216 | cp docker/service/docker.service /etc/systemd/system/ 217 | chmod +x /usr/bin/docker* 218 | chmod 754 /etc/systemd/system/docker.service 219 | log "... 启动 docker" 220 | systemctl enable docker; systemctl daemon-reload; service docker start 2>&1 | tee -a ${CURRENT_DIR}/install.log 221 | else 222 | log "... 在线安装 docker" 223 | curl -fsSL https://resource.fit2cloud.com/get-docker-linux.sh -o get-docker.sh 2>&1 | tee -a ${CURRENT_DIR}/install.log 224 | if [[ ! -f get-docker.sh ]];then 225 | log "docker 在线安装脚本下载失败,请稍候重试" 226 | exit 1 227 | fi 228 | sudo sh get-docker.sh 2>&1 | tee -a ${CURRENT_DIR}/install.log 229 | log "... 启动 docker" 230 | systemctl enable docker; systemctl daemon-reload; service docker start 2>&1 | tee -a ${CURRENT_DIR}/install.log 231 | fi 232 | 233 | if [ ! -d "$docker_config_folder" ];then 234 | mkdir -p "$docker_config_folder" 235 | fi 236 | 237 | docker version >/dev/null 2>&1 238 | if [ $? -ne 0 ]; then 239 | log "docker 安装失败" 240 | exit 1 241 | else 242 | log "docker 安装成功" 243 | fi 244 | fi 245 | 246 | ##Install Latest Stable Docker Compose Release 247 | docker-compose version >/dev/null 2>&1 248 | if [ $? -ne 0 ]; then 249 | docker compose version >/dev/null 2>&1 250 | if [ $? -eq 0 ]; then 251 | echo 'docker compose "$@"' > /usr/bin/docker-compose 252 | chmod +x /usr/bin/docker-compose 253 | else 254 | if [[ -d docker ]]; then 255 | log "... 离线安装 docker-compose" 256 | cp docker/bin/docker-compose /usr/bin/ 257 | chmod +x /usr/bin/docker-compose 258 | else 259 | log "... 在线安装 docker-compose" 260 | curl -L https://resource.fit2cloud.com/docker/compose/releases/download/v2.16.0/docker-compose-$(uname -s | tr A-Z a-z)-$(uname -m) -o /usr/local/bin/docker-compose 2>&1 | tee -a ${CURRENT_DIR}/install.log 261 | if [[ ! -f /usr/local/bin/docker-compose ]];then 262 | log "docker-compose 下载失败,请稍候重试" 263 | exit 1 264 | fi 265 | chmod +x /usr/local/bin/docker-compose 266 | ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose 267 | fi 268 | fi 269 | 270 | docker-compose version >/dev/null 271 | if [ $? -ne 0 ]; then 272 | log "docker-compose 安装失败" 273 | exit 1 274 | else 275 | log "docker-compose 安装成功" 276 | fi 277 | else 278 | log "检测到 Docker Compose 已安装,跳过安装步骤" 279 | fi 280 | 281 | export COMPOSE_HTTP_TIMEOUT=180 282 | cd ${CURRENT_DIR} 283 | # 加载镜像 284 | if [[ -d images ]]; then 285 | log "加载镜像" 286 | for i in $(ls images); do 287 | if [ ${DE_ENGINE_MODE} != "local" ]; then 288 | if [[ $i =~ "doris" ]] || [[ $i =~ "kettle" ]]; then 289 | continue 290 | fi 291 | fi 292 | docker load -i images/$i 2>&1 | tee -a ${CURRENT_DIR}/install.log 293 | done 294 | else 295 | log "拉取镜像" 296 | cd ${DE_RUN_BASE} && docker-compose $compose_files pull 2>&1 297 | 298 | DEVERSION=$(cat ${CURRENT_DIR}/dataease/templates/version) 299 | curl -sfL https://resource.fit2cloud.com/installation-log.sh | sh -s de ${INSTALL_TYPE} ${DEVERSION} 300 | cd - 301 | fi 302 | 303 | log "配置 dataease Service" 304 | cp ${DE_RUN_BASE}/bin/dataease/dataease.service /etc/init.d/dataease 305 | chmod a+x /etc/init.d/dataease 306 | if which chkconfig;then 307 | chkconfig --add dataease 308 | fi 309 | 310 | if [ -f /etc/rc.d/rc.local ];then 311 | dataeaseService=$(grep "service dataease start" /etc/rc.d/rc.local | wc -l) 312 | if [ "$dataeaseService" -eq 0 ]; then 313 | echo "sleep 10" >> /etc/rc.d/rc.local 314 | echo "service dataease start" >> /etc/rc.d/rc.local 315 | fi 316 | chmod +x /etc/rc.d/rc.local 317 | fi 318 | 319 | if [[ $(grep "vm.max_map_count" /etc/sysctl.conf | wc -l) -eq 0 ]];then 320 | sysctl -w vm.max_map_count=2000000 321 | echo "vm.max_map_count=2000000" >> /etc/sysctl.conf 322 | elif (( $(grep "vm.max_map_count" /etc/sysctl.conf | awk -F'=' '{print $2}') < 2000000 ));then 323 | sysctl -w vm.max_map_count=2000000 324 | sed -i 's/^vm\.max_map_count.*/vm\.max_map_count=2000000/' /etc/sysctl.conf 325 | fi 326 | 327 | if [ $(grep "net.ipv4.ip_forward" /etc/sysctl.conf | wc -l) -eq 0 ];then 328 | sysctl -w net.ipv4.ip_forward=1 329 | echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf 330 | else 331 | sed -i 's/^net\.ipv4\.ip_forward.*/net\.ipv4\.ip_forward=1/' /etc/sysctl.conf 332 | fi 333 | 334 | if which firewall-cmd >/dev/null; then 335 | if systemctl is-active firewalld &>/dev/null ;then 336 | log "防火墙端口开放" 337 | firewall-cmd --zone=public --add-port=${DE_PORT}/tcp --permanent 338 | firewall-cmd --reload 339 | else 340 | log "防火墙未开启,忽略端口开放" 341 | fi 342 | fi 343 | 344 | http_code=$(curl -sILw "%{http_code}\n" http://localhost:${DE_PORT} -o /dev/null) 345 | if [[ $http_code == 200 ]];then 346 | log "停止服务进行升级..." 347 | dectl uninstall 348 | fi 349 | 350 | log "启动服务" 351 | dectl reload | tee -a ${CURRENT_DIR}/install.log 352 | dectl status 2>&1 | tee -a ${CURRENT_DIR}/install.log 353 | 354 | for b in {1..30} 355 | do 356 | sleep 3 357 | http_code=$(curl -sILw "%{http_code}\n" http://localhost:${DE_PORT} -o /dev/null) 358 | if [[ $http_code == 000 ]];then 359 | log "服务启动中,请稍候 ..." 360 | elif [[ $http_code == 200 ]];then 361 | log "服务启动成功!" 362 | break; 363 | else 364 | log "服务启动出错!" 365 | exit 1 366 | fi 367 | done 368 | 369 | if [[ $http_code != 200 ]];then 370 | log "【警告】服务在等待时间内未完全启动!请稍后使用 dectl status 检查服务运行状况。" 371 | fi 372 | 373 | echo -e "======================= 安装完成 =======================\n" 2>&1 | tee -a ${CURRENT_DIR}/install.log 374 | echo -e "请通过以下方式访问:\n URL: http://\$LOCAL_IP:$DE_PORT\n 用户名: admin\n 初始密码: dataease" 2>&1 | tee -a ${CURRENT_DIR}/install.log 375 | 376 | -------------------------------------------------------------------------------- /dataease/logs/README.md: -------------------------------------------------------------------------------- 1 | # 日志目录 -------------------------------------------------------------------------------- /dataease/templates/.kettle/repositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | KettleFileRepository 4 | repo 5 | File repository 6 | false 7 | /opt/dataease/data/kettle 8 | N 9 | N 10 | -------------------------------------------------------------------------------- /dataease/templates/be.conf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | PPROF_TMPDIR="$DORIS_HOME/log/" 19 | 20 | # INFO, WARNING, ERROR, FATAL 21 | sys_log_level = INFO 22 | 23 | # ports for admin, web, heartbeat service 24 | be_port = 9060 25 | be_rpc_port = 9070 26 | webserver_port = 8040 27 | heartbeat_service_port = 9050 28 | brpc_port = 8060 29 | 30 | # Choose one if there are more than one ip except loopback address. 31 | # Note that there should at most one ip match this list. 32 | # If no ip match this rule, will choose one randomly. 33 | # use CIDR format, e.g. 10.10.10.0/24 34 | # Default value is empty. 35 | # priority_networks = 10.10.10.0/24;192.168.0.0/16 36 | 37 | # data root path, separate by ';' 38 | # you can specify the storage medium of each root path, HDD or SSD 39 | # you can add capacity limit at the end of each root path, seperate by ',' 40 | # eg: 41 | # storage_root_path = /home/disk1/doris.HDD,50;/home/disk2/doris.SSD,1;/home/disk2/doris 42 | # /home/disk1/doris.HDD, capacity limit is 50GB, HDD; 43 | # /home/disk2/doris.SSD, capacity limit is 1GB, SSD; 44 | # /home/disk2/doris, capacity limit is disk capacity, HDD(default) 45 | # 46 | # you also can specify the properties by setting ':', seperate by ',' 47 | # property 'medium' has a higher priority than the extension of path 48 | # 49 | # Default value is ${DORIS_HOME}/storage, you should create it by hand. 50 | # storage_root_path = ${DORIS_HOME}/storage 51 | 52 | # Advanced configurations 53 | # sys_log_dir = ${DORIS_HOME}/log 54 | # sys_log_roll_mode = SIZE-MB-1024 55 | sys_log_roll_num = 1 56 | load_error_log_reserve_hours=1 57 | # sys_log_verbose_modules = * 58 | # log_buffer_level = -1 59 | # palo_cgroups 60 | trash_file_expire_time_sec = 60 61 | snapshot_expire_time_sec = 60 62 | pending_data_expire_time_sec = 60 63 | enable_spilling = true -------------------------------------------------------------------------------- /dataease/templates/dataease.properties: -------------------------------------------------------------------------------- 1 | # 数据库配置 2 | spring.datasource.url=jdbc:mysql://${DE_MYSQL_HOST}:${DE_MYSQL_PORT}/${DE_MYSQL_DB}?${DE_MYSQL_PARAMS} 3 | spring.datasource.username=${DE_MYSQL_USER} 4 | spring.datasource.password=${DE_MYSQL_PASSWORD} 5 | 6 | carte.host=${DE_CARTE_HOST} 7 | carte.port=${DE_CARTE_PORT} 8 | carte.user=${DE_CARTE_USER} 9 | carte.passwd=${DE_CARTE_PASSWORD} 10 | 11 | doris.db=${DE_DORIS_DB} 12 | doris.user=${DE_DORIS_USER} 13 | doris.password=${DE_DORIS_PASSWORD} 14 | doris.host=${DE_DORIS_HOST} 15 | doris.port=${DE_DORIS_PORT} 16 | doris.httpPort=${DE_DORIS_HTTPPORT} 17 | 18 | #新建用户初始密码 19 | dataease.init_password=DataEase123456 20 | #登录超时时间单位min 如果不设置 默认8小时也就是480 21 | dataease.login_timeout=${DE_LOGIN_TIMEOUT} 22 | 23 | logger.level=INFO 24 | 25 | #DE运行模式,可选值有 local、simple、cluster,分别对应 本地模式、精简模式、集群模式 26 | engine_mode=${DE_ENGINE_MODE} 27 | -------------------------------------------------------------------------------- /dataease/templates/fe.conf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | ##################################################################### 19 | ## The uppercase properties are read and exported by bin/start_fe.sh. 20 | ## To see all Frontend configurations, 21 | ## see fe/src/org/apache/doris/common/Config.java 22 | ##################################################################### 23 | 24 | # the output dir of stderr and stdout 25 | LOG_DIR = ${DORIS_HOME}/log 26 | 27 | DATE = `date +%Y%m%d-%H%M%S` 28 | JAVA_OPTS="-Xmx4096m -XX:+UseMembar -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=7 -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -XX:-CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=80 -XX:SoftRefLRUPolicyMSPerMB=0 -Xloggc:$DORIS_HOME/log/fe.gc.log.$DATE" 29 | 30 | # For jdk 9+, this JAVA_OPTS will be used as default JVM options 31 | JAVA_OPTS_FOR_JDK_9="-Xmx4096m -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=7 -XX:+CMSClassUnloadingEnabled -XX:-CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=80 -XX:SoftRefLRUPolicyMSPerMB=0 -Xlog:gc*:$DORIS_HOME/log/fe.gc.log.$DATE:time" 32 | 33 | ## 34 | ## the lowercase properties are read by main program. 35 | ## 36 | 37 | # INFO, WARN, ERROR, FATAL 38 | sys_log_level = INFO 39 | 40 | # store metadata, must be created before start FE. 41 | # Default value is ${DORIS_HOME}/doris-meta 42 | # meta_dir = ${DORIS_HOME}/doris-meta 43 | 44 | http_port = 8030 45 | rpc_port = 9020 46 | query_port = 9030 47 | edit_log_port = 9010 48 | mysql_service_nio_enabled = true 49 | 50 | # Choose one if there are more than one ip except loopback address. 51 | # Note that there should at most one ip match this list. 52 | # If no ip match this rule, will choose one randomly. 53 | # use CIDR format, e.g. 10.10.10.0/24 54 | # Default value is empty. 55 | # priority_networks = 10.10.10.0/24;192.168.0.0/16 56 | 57 | # Advanced configurations 58 | # log_roll_size_mb = 1024 59 | # sys_log_dir = ${DORIS_HOME}/log 60 | sys_log_roll_num = 1 61 | # sys_log_verbose_modules = 62 | # audit_log_dir = ${DORIS_HOME}/log 63 | # audit_log_modules = slow_query, query 64 | audit_log_roll_num = 1 65 | # meta_delay_toleration_second = 10 66 | qe_max_connection = 65535 67 | max_conn_per_user = 1024 68 | # qe_query_timeout_second = 300 69 | # qe_slow_log_ms = 5000 70 | sys_log_delete_age=1d 71 | audit_log_delete_age=3d 72 | exec_mem_limit=8589934592 73 | tablet_create_timeout_second=30 74 | catalog_trash_expire_second = 60 75 | enable_batch_delete_by_default=true 76 | max_layout_length_per_row=10000000 77 | -------------------------------------------------------------------------------- /dataease/templates/my.cnf: -------------------------------------------------------------------------------- 1 | [mysqld] 2 | datadir=/var/lib/mysql 3 | 4 | default-storage-engine=INNODB 5 | character_set_server=utf8 6 | lower_case_table_names=1 7 | table_open_cache=128 8 | max_connections=2000 9 | max_connect_errors=6000 10 | innodb_file_per_table=1 11 | innodb_buffer_pool_size=1G 12 | max_allowed_packet=64M 13 | transaction_isolation=READ-COMMITTED 14 | innodb_flush_method=O_DIRECT 15 | innodb_lock_wait_timeout=1800 16 | innodb_flush_log_at_trx_commit=0 17 | sync_binlog=0 18 | group_concat_max_len=1024000 19 | 20 | sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION 21 | 22 | skip-name-resolve 23 | 24 | [mysql] 25 | default-character-set=utf8 26 | 27 | [mysql.server] 28 | default-character-set=utf8 29 | -------------------------------------------------------------------------------- /dataease/templates/mysql.env: -------------------------------------------------------------------------------- 1 | MYSQL_ROOT_PASSWORD=${DE_MYSQL_PASSWORD} -------------------------------------------------------------------------------- /dataease/templates/version: -------------------------------------------------------------------------------- 1 | 13_20180929_184557 2 | -------------------------------------------------------------------------------- /dataease/uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DE_BASE=/opt 4 | 5 | read -r -p "即将卸载 DataEase 服务,包括删除运行目录、数据及相关镜像,是否继续? [Y/n] " input 6 | 7 | case $input in 8 | [yY][eE][sS]|[yY]) 9 | echo "Yes" 10 | ;; 11 | [nN][oO]|[nN]) 12 | echo "No" 13 | exit 1 14 | ;; 15 | *) 16 | echo "无效输入..." 17 | exit 1 18 | ;; 19 | esac 20 | 21 | if [ -f /usr/bin/dectl ]; then 22 | # 获取已安装的 DataEase 的运行目录 23 | DE_BASE=$(grep "^DE_BASE=" /usr/bin/dectl | cut -d'=' -f2) 24 | fi 25 | 26 | echo "停止 DataEase 服务" 27 | dectl uninstall 28 | 29 | # 清理 DataEase 相关镜像 30 | if test ! -z "$(docker images -f dangling=true -q)"; then 31 | echo "清理虚悬镜像" 32 | docker rmi $(docker images -f dangling=true -q) 33 | fi 34 | 35 | if test -n "$(docker images | grep 'registry.cn-qingdao.aliyuncs.com/dataease')"; then 36 | echo "清理 DataEase 镜像" 37 | docker rmi $(docker images | grep "registry.cn-qingdao.aliyuncs.com/dataease" | awk -F' ' '{print $1":"$2}') 38 | fi 39 | 40 | # 清理 DataEase 运行目录及命令行工具 dectl 41 | rm -rf ${DE_BASE}/dataease /usr/local/bin/dectl /usr/bin/dectl -------------------------------------------------------------------------------- /quick_start.sh: -------------------------------------------------------------------------------- 1 | git_urls=('gitee.com' 'github.com') 2 | 3 | if [[ -x "$(command -v python)" ]];then 4 | py_cmd='python' 5 | elif [[ -x "$(command -v python3)" ]]; then 6 | py_cmd='python3' 7 | else 8 | git_urls=('github.com') 9 | fi 10 | 11 | for git_url in ${git_urls[*]} 12 | do 13 | success="true" 14 | for i in {1..3} 15 | do 16 | echo -ne "检测 ${git_url} ... ${i} " 17 | curl -m 5 -kIs https://${git_url} >/dev/null 18 | if [ $? != 0 ];then 19 | echo "failed" 20 | success="false" 21 | break 22 | else 23 | echo "ok" 24 | fi 25 | done 26 | if [[ ${success} == "true" ]];then 27 | server_url=${git_url} 28 | break 29 | fi 30 | done 31 | 32 | if [[ "x${server_url}" == "x" ]];then 33 | echo "没有找到稳定的下载服务器,请稍候重试" 34 | exit 1 35 | fi 36 | 37 | echo "使用下载服务器 ${server_url}" 38 | 39 | if [[ "${server_url}" == "gitee.com" ]];then 40 | owner='fit2cloud-feizhiyun' 41 | repo='DataEase' 42 | gitee_release_content=$(curl -s https://gitee.com/api/v5/repos/${owner}/${repo}/releases/latest) 43 | # export LC_ALL="en_US.utf8" 44 | DEVERSION=$($py_cmd -c "import json; obj=json.loads('$gitee_release_content', strict=False); print(obj['tag_name']);") 45 | else 46 | owner='dataease' 47 | repo='dataease' 48 | DEVERSION=$(curl -s https://api.github.com/repos/${owner}/${repo}/releases/latest | grep -e "\"tag_name\"" | sed -r 's/.*: "(.*)",/\1/') 49 | fi 50 | 51 | if [[ "x${DEVERSION}" == "x" ]];then 52 | echo "获取最新版本失败,请稍候重试" 53 | exit 1 54 | fi 55 | 56 | echo "开始下载 DataEase ${DEVERSION} 版本在线安装包" 57 | dataease_online_file_name="dataease-${DEVERSION}-online.tar.gz" 58 | download_url="https://${server_url}/${owner}/${repo}/releases/download/${DEVERSION}/${dataease_online_file_name}" 59 | echo "下载地址: ${download_url}" 60 | 61 | curl -LOk -m 60 -o ${dataease_online_file_name} ${download_url} 62 | 63 | if [ ! -f ${dataease_online_file_name} ];then 64 | echo "下载在线安装包失败,请试试重新执行一次安装命令。" 65 | exit 1 66 | fi 67 | 68 | tar zxvf ${dataease_online_file_name} 69 | if [ $? != 0 ];then 70 | echo "下载在线安装包失败,请试试重新执行一次安装命令。" 71 | rm -f ${dataease_online_file_name} 72 | exit 1 73 | fi 74 | cd dataease-${DEVERSION}-online 75 | 76 | /bin/bash install.sh --------------------------------------------------------------------------------