Skip to content

Commit 289f260

Browse files
committed
3.0 configuration (#3825)
Document a new declarative configuration approach: local YAML file and etcd config
1 parent 148f217 commit 289f260

File tree

41 files changed

+1861
-451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1861
-451
lines changed

doc/book/admin/start_stop_instance.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ With a single ``tt`` call, you can:
124124
* connect to a specific instance of an application
125125
* stop a specific instance of an application or all its instances
126126

127+
.. _admin-start_stop_instance-multi-instance-layout:
128+
127129
Application layout
128130
~~~~~~~~~~~~~~~~~~
129131

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Configuration
2+
3+
A sample application demonstrating various features related to Tarantool [configuration](https://www.tarantool.io/en/doc/latest/concepts/configuration/).
4+
5+
## Running
6+
7+
To run applications placed in [instances.enabled](instances.enabled), go to the `config` directory in the terminal and execute the `tt start` command, for example:
8+
9+
```console
10+
$ tt start application
11+
```
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
app:
2+
file: 'myapp.lua'
3+
cfg:
4+
greeting: 'Hello'
5+
6+
groups:
7+
group001:
8+
replicasets:
9+
replicaset001:
10+
instances:
11+
instance001:
12+
iproto:
13+
listen: "3301"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
instance001:
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- myapp.lua --
2+
local log = require('log').new("myapp")
3+
local config = require('config')
4+
log.info("%s from app, %s!", config:get('app.cfg.greeting'), box.info.name)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
config:
2+
etcd:
3+
endpoints:
4+
- http://localhost:2379
5+
prefix: /example
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
instance001:
2+
instance002:
3+
instance003:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
config:
2+
etcd:
3+
endpoints:
4+
- http://localhost:2379
5+
prefix: /example
6+
username: testuser
7+
password: foobar
8+
ssl:
9+
ca_file: ca.crt
10+
http:
11+
request:
12+
timeout: 3
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
instance001:
2+
instance002:
3+
instance003:
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
iproto:
2+
listen: "3301"
3+
4+
groups:
5+
group001:
6+
replicasets:
7+
replicaset001:
8+
instances:
9+
instance001: {}

0 commit comments

Comments
 (0)