| // Licensed to the Apache Software Foundation (ASF) under one or more |
| // contributor license agreements. See the NOTICE file distributed with |
| // this work for additional information regarding copyright ownership. |
| // The ASF licenses this file to You under the Apache License, Version 2.0 |
| // (the "License"); you may not use this file except in compliance with |
| // the License. You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| = Getting Started Guide |
| |
| This guide provides essential details on how to start working with Ignite 3.0 Beta by using the Ignite CLI tool, including the following information: |
| |
| * How to use the Ignite CLI tool to manage nodes. |
| * How to run built-in examples. |
| * Additional information regarding the use of the tool. |
| |
| == Prerequisites |
| |
| |
| Ignite 3.0 Beta was officially tested on: |
| |
| include::../includes/prereqs.adoc[] |
| |
| == Starting Ignite Node |
| |
| In this guide we will use a link:../installation/installing-using-zip[zip] archive installation. To start an Ignite node, go to the `ignite3-db-3.0.0-beta1` folder and run the following command: |
| |
| |
| [tabs] |
| -- |
| tab:Linux[] |
| ---- |
| bin/ignite3db start |
| ---- |
| |
| tab:Windows[] |
| NOTE: You need to install Java in Bash environment to run Ignite on Windows. |
| ---- |
| bash bin\ignite3db start |
| ---- |
| -- |
| |
| |
| |
| == Using Ignite CLI Tool |
| |
| Ignite CLI is a single entry point for all the Ignite operations. In this guide we will use it to start a cluster on a node you started on the previous step and execute a simple SQL query. |
| |
| //* Manage existing nodes. |
| //* Install new nodes. |
| //* Update old nodes to new versions. |
| //* Install or remove optional modules. |
| |
| [tabs] |
| -- |
| tab:Linux[] |
| ---- |
| ignite3-cli-3.0.0-beta1/bin/ignite3 |
| ---- |
| |
| tab:Windows[] |
| NOTE: You need to install Java in Bash environment to run Ignite 3 beta on Windows. |
| ---- |
| bash ignite3-cli-3.0.0-beta1\bin\ignite3 |
| ---- |
| -- |
| |
| After you start the node, you need to initialize a cluster. To do this, use the `cluster init` command: |
| |
| ---- |
| cluster init -n=sampleCluster -m=defaultNode |
| ---- |
| |
| This command creates a simple cluster you can interact with. For example, you can perform sql requests from the command line, or use the thin client to perform requests. |
| |
| NOTE: If you have issues with Ignite 3 Alpha, check the logs in the `ignite3-db-3.0.0-beta1/log` folder. |
| |
| |
| * Use the `CREATE TABLE` statement to create a new table: |
| + |
| ---- |
| sql "CREATE TABLE IF NOT EXISTS Person (id int primary key, city varchar, name varchar, age int, company varchar)" |
| ---- |
| + |
| * Fill the table with data by using `INSERT` statement: |
| + |
| ---- |
| sql "INSERT INTO Person (id, city, name, age, company) VALUES ('1', 'London', 'John Doe', '42', 'Apache')" |
| sql "INSERT INTO Person (id, city, name, age, company) VALUES ('2', 'New York', 'Jane Doe', '36', 'Apache')" |
| ---- |
| + |
| * Get all data you inserted on previous step: |
| + |
| ---- |
| sql "SELECT * FROM Person" |
| ---- |
| |
| NOTE: For more information about available SQL statements, see the link:sql-reference/ddl[SQL Reference] section. |
| |
| == Stopping the Cluster |
| |
| After you are done working on the cluster, you need to stop the node. Go to the `ignite3-db-3.0.0-beta1` folder and run the following command: |
| |
| |
| [tabs] |
| -- |
| tab:Linux[] |
| ---- |
| bin/ignite3db stop |
| ---- |
| |
| tab:Windows[] |
| ---- |
| bash bin\ignite3db stop |
| ---- |
| -- |
| |
| == Next Steps |
| |
| From here, you may want to: |
| |
| * Check out the link:ignite-cli-tool[Ignite CLI Tool] page for more detail on supported commands. |
| * Try out our link:https://github.com/apache/ignite-3/tree/main/examples[examples]. |
| |
| //== Apache Ignite Configuration |
| // |
| //Apache Ignite uses HOCON configuration format. |
| //For more detail, please see the link:https://github.com/lightbend/config/blob/master/HOCON.md[HOCON documentation,window=_blank]. |