Skip to content

Commit b8f1ceb

Browse files
committed
Increase Markdown foo
1 parent 3841611 commit b8f1ceb

File tree

1 file changed

+49
-31
lines changed

1 file changed

+49
-31
lines changed

README.md

+49-31
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,31 @@ And lots of information from my orientdb+docker explorations. Read on!
1111

1212

1313
Building the image on your own
14-
==============================
14+
------------------------------
1515

1616
1. Checkout this project to a local folder cding to it
1717

1818
2. Build the image:
19-
`docker built -t <your_dockerhub_user>/orientdb-1.7.8 .`
19+
```bash
20+
docker built -t <YOUR_DOCKER_HUB_USER>/orientdb-1.7.8 .
21+
```
2022

21-
3. Push it to your DockerHub repository (it will ask for your login credentials):
22-
`docker push <your_dockerhub_user>/orientdb-1.7.8`
23+
3. Push it to your Docker Hub repository (it will ask for your login credentials):
24+
```bash
25+
docker push <YOUR_DOCKER_HUB_USER>/orientdb-1.7.8
26+
```
2327

2428
All examples below are using my own image nesrait/orientdb-1.7.8. If you build your own image please find/replace "nesrait" with your Docker Hub user.
2529

2630

2731
Running orientdb
28-
================
32+
----------------
2933

3034
To run the image, run:
3135

32-
`docker run --name orientdb -d -v <config_path>:/opt/orientdb/config -v <databases_path>:/opt/orientdb/databases -v <backup_path>:/opt/orientdb/backup -p 2424 -p 2480 nesrait/orientdb-1.7.8`
36+
```bash
37+
docker run --name orientdb -d -v <config_path>:/opt/orientdb/config -v <databases_path>:/opt/orientdb/databases -v <backup_path>:/opt/orientdb/backup -p 2424 -p 2480 nesrait/orientdb-1.7.8
38+
```
3339

3440
The docker image contains a unconfigured orientdb installation and for running it you need to provide your own config folder from which OrientDB will read its startup settings.
3541

@@ -39,69 +45,81 @@ The backup folder only needs to be mapped if you activate that setting on your O
3945

4046

4147
Persistent distributed storage using BTSync
42-
===========================================
48+
-------------------------------------------
4349

4450
If you're not running OrientDB in a distributed configuration you need to take special care to backup your database (in case your host goes down).
4551

4652
Below is a simple, yet hackish, way to do this: using BTSync data containers to propagate the OrientDB config, LIVE databases and backup folders to remote location(s).
4753
Note: don't trust the remote copy of the LIVE database folder unless the server is down and it has correctly flushed changes to disk.
4854

4955
1. Create BTSync shared folders on any remote location for the various folder you want to replicate
50-
1.1 - config: orientdb configuration inside the config folder
51-
1.2 - databases: the LIVE databases folder
52-
1.3 - backup: the place where OrientDB will store the zipped backups (if you activate the backup in the configuration file)
5356

54-
2. Take note of the BTSync folder secrets <CONFIG_FOLDER_SECRET>, <DATABASES_FOLDER_SECRET>, <BACKUP_FOLDER_SECRET>
57+
1.1. config: orientdb configuration inside the config folder
5558

56-
3. Launch BTSync data containers for each of the synched folder you created giving them proper names:
57-
`docker run -d --name orientdb_config -v /opt/orientdb/config nesrait/btsync /opt/orientdb/config <CONFIG_FOLDER_SECRET>`
58-
`docker run -d --name orientdb_databases -v /opt/orientdb/databases nesrait/btsync /opt/orientdb/databases <DATABASES_FOLDER_SECRET>`
59-
`docker run -d --name orientdb_backup -v /opt/orientdb/backup nesrait/btsync /opt/orientdb/backup <BACKUP_FOLDER_SECRET>`
59+
1.2. databases: the LIVE databases folder
60+
61+
1.3. backup: the place where OrientDB will store the zipped backups (if you activate the backup in the configuration file)
6062

61-
3. Wait until all files have magically appeared inside your BTSync data volumes:
62-
`docker run --rm -i -t --volumes-from orientdb_config --volumes-from orientdb_databases --volumes-from orientdb_backup ubuntu du -h /opt/orientdb/config /opt/orientdb/databases /opt/orientdb/backup`
63+
2. Take note of the BTSync folder secrets CONFIG_FOLDER_SECRET, DATABASES_FOLDER_SECRET, BACKUP_FOLDER_SECRET
6364

64-
4. Finally you're ready to start your OrientDB server
65-
`docker run --name orientdb -d \
65+
3. Launch BTSync data containers for each of the synched folder you created giving them proper names:
66+
```bash
67+
docker run -d --name orientdb_config -v /opt/orientdb/config nesrait/btsync /opt/orientdb/config CONFIG_FOLDER_SECRET
68+
docker run -d --name orientdb_databases -v /opt/orientdb/databases nesrait/btsync /opt/orientdb/databases DATABASES_FOLDER_SECRET
69+
docker run -d --name orientdb_backup -v /opt/orientdb/backup nesrait/btsync /opt/orientdb/backup BACKUP_FOLDER_SECRET
70+
```
71+
72+
4. Wait until all files have magically appeared inside your BTSync data volumes:
73+
```bash
74+
docker run --rm -i -t --volumes-from orientdb_config --volumes-from orientdb_databases --volumes-from orientdb_backup ubuntu du -h /opt/orientdb/config /opt/orientdb/databases /opt/orientdb/backup
75+
```
76+
77+
5. Finally you're ready to start your OrientDB server
78+
```bash
79+
docker run --name orientdb -d \
6680
--volumes-from orientdb_config \
6781
--volumes-from orientdb_databases \
6882
--volumes-from orientdb_backup \
6983
-p 2424 -p 2480 \
70-
nesrait/orientdb-1.7.8`
84+
nesrait/orientdb-1.7.8
85+
```
7186

7287

7388
OrientDB distributed
74-
====================
89+
--------------------
7590

7691
If you're running OrientDB distributed* you won't have the problem of losing the contents of your databases folder since they are already replicated to the other OrientDB nodes. From the setup above simply leave out the "--volumes-from orientdb_databases" argument and OrientDB will use the container storage to hold your databases' files.
7792

78-
*note: some extra work might be needed to correctly setup hazelcast running inside docker containers (see https://groups.google.com/forum/#!topic/vertx/MvKcz_aTaWM).
93+
*note: some extra work might be needed to correctly setup hazelcast running inside docker containers ([see this discussion](https://groups.google.com/forum/#!topic/vertx/MvKcz_aTaWM)).
7994

8095

8196
Ad-hoc backups
82-
==============
97+
--------------
8398

84-
With orientdb 1.7.8 we can now create ad-hoc backups by taking advantage of the new backup.sh script:
85-
https://github.com/orientechnologies/orientdb/wiki/Backup-and-Restore#backup-database
99+
With orientdb 1.7.8 we can now create ad-hoc backups by taking advantage of [the new backup.sh script](https://github.com/orientechnologies/orientdb/wiki/Backup-and-Restore#backup-database):
86100

87101
- Using the orientdb_backup data container that was created above:
88-
`docker run -i -t --volumes-from orientdb_config --volumes-from orientdb_backup nesrait/orientdb-1.7.8 ./backup.sh <dburl> <user> <password> /opt/orientdb/backup/<backup_file> [<type>]`
102+
```bash
103+
docker run -i -t --volumes-from orientdb_config --volumes-from orientdb_backup nesrait/orientdb-1.7.8 ./backup.sh <dburl> <user> <password> /opt/orientdb/backup/<backup_file> [<type>]
104+
```
89105

90106
- Or using a host folder:
107+
91108
`docker run -i -t --volumes-from orientdb_config -v <host_backup_path>:/backup nesrait/orientdb-1.7.8 ./backup.sh <dburl> <user> <password> /backup/<backup_file> [<type>]`
92109

93110
Either way, when the backup completes you will have the backup file located outside of the OrientDB container and read for safekeeping.
94111

95-
Note: I haven't tried the non-blocking backup (type=lvm) yet but I read about some issues with a docker LVM dependency:
96-
https://groups.google.com/forum/#!topic/docker-user/n4Xtvsb4RAw
112+
Note: I haven't tried the non-blocking backup (type=lvm) yet but found [this discussion about a docker LVM dependency issue](https://groups.google.com/forum/#!topic/docker-user/n4Xtvsb4RAw).
97113
98114
99115
Running the orientdb console
100-
============================
116+
----------------------------
101117
102-
`docker run --rm -it \
118+
```bash
119+
docker run --rm -it \
103120
--volumes-from orientdb_config \
104121
--volumes-from orientdb_databases \
105122
--volumes-from orientdb_backup \
106123
nesrait/orientdb-1.7.8 \
107-
/opt/orientdb/bin/console.sh`
124+
/opt/orientdb/bin/console.sh
125+
```

0 commit comments

Comments
 (0)