Skip to content

Add getting started with TCM tutorial #4022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
credentials:
users:
guest:
roles: [super]
groups:
group-001:
replicasets:
replicaset-001:
replication:
failover: manual
leader: instance-001
instances:
instance-001:
iproto:
listen:
- uri: '127.0.0.1:3301'
advertise:
client: '127.0.0.1:3301'
instance-002:
iproto:
listen:
- uri: '127.0.0.1:3302'
advertise:
client: '127.0.0.1:3302'
instance-003:
iproto:
listen:
- uri: '127.0.0.1:3303'
advertise:
client: '127.0.0.1:3303'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
instance-001:
instance-002:
instance-003:
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config:
etcd:
endpoints:
- http://localhost:2379
prefix: /default
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
instance-001:
instance-002:
instance-003:
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
function create_space()
box.schema.space.create('bands')
box.space.bands:format({
{ name = 'id', type = 'unsigned' },
{ name = 'band_name', type = 'string' },
{ name = 'year', type = 'unsigned' }
})
box.space.bands:create_index('primary', { type = "tree", parts = { 'id' } })
box.schema.user.grant('guest', 'read,write,execute', 'universe')
end

function load_data()
box.space.bands:insert { 1, 'Roxette', 1986 }
box.space.bands:insert { 2, 'Scorpions', 1965 }
box.space.bands:insert { 3, 'Ace of Base', 1987 }
end

function select_data()
box.space.bands:select { 3 }
end
Loading