Skip to content

Commit de800ab

Browse files
committed
v3.0.0
0 parents  commit de800ab

File tree

8 files changed

+872
-0
lines changed

8 files changed

+872
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.env
2+
images/
3+
.version

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 CYBERTEC PostgreSQL International GmbH
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+172
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
<p align="center">
2+
<img alt="CYBERTEC Migrator" width="300px" src="https://www.cybertec-postgresql.com/wp-content/uploads/2018/03/Migrator_neu-300x79.png"/>
3+
<br/><br/>
4+
<i>Streamlined Oracle to PostgreSQL migration</i>
5+
</p>
6+
7+
---
8+
9+
<p align="center">
10+
<a href="#getting-started">Getting Started</a> •
11+
<a href="#running-the-migrator">Running the Migrator</a> •
12+
<a href="#contact">Contact</a>
13+
</p>
14+
15+
[_CYBERTEC Migrator_](https://www.cybertec-postgresql.com/en/products/cybertec-migrator/) is a streamlined and user-friendly tool that helps you to organize and efficiently migrate multiple Oracle databases to PostgreSQL.
16+
In addition to migrating your data professionally and securely with minimum effort, _CYBERTEC Migrator_ allows you to visually monitor and track the whole process at any time.
17+
18+
<br/>
19+
20+
<p align="center">
21+
<a href="http://www.youtube.com/watch?v=8hSrFVOw3Rc"><img alt="CYBERTEC Migrator v3 Demonstration" width="384px" src="http://img.youtube.com/vi/8hSrFVOw3Rc/0.jpg"/></a><br/>
22+
<b>Product Demo</b>
23+
</p>
24+
25+
---
26+
27+
For detailed information see the list of [supported migration features for Oracle](docs/oracle-migration-support.md).
28+
29+
## Table of Contents
30+
31+
1. [What's New](#whats-new)
32+
2. [Getting Started](#getting-started)
33+
3. [Running the Migrator](#running-the-migrator)
34+
4. [Contact](#contact)
35+
36+
## What's New
37+
38+
- `v3.0.0`
39+
40+
With _CYBERTEC Migrator_ v3 we've rebuilt the GUI from the ground up to simplify database migrations even further
41+
42+
- Get a brief look at the structure of your source database by using the migration _Overview_
43+
- Quickly drill down into your data model with the help of the new _Sidebar_
44+
- Stages (natural synchronization points of a migration process) now guide you through the migration process
45+
- **Structure** stage: create database objects necessary to migrate the table data
46+
- **Data** stage: migrate table data in parallel
47+
- **Logic** stage: create functions, triggers, views
48+
- **Integrity** stage: parallel creation of primary keys, indices, foreign keys, and constraint checks
49+
- Enjoy quick round trips and gain confidence in the correctness of your migration thanks to the reworked _Migration Controls_
50+
- **Start** migration from the beginning
51+
- **Rerun stage** in case of an error
52+
- **Continue** to next stage
53+
- **Abort** migration and restart at any time
54+
- Explore the inner workings of your migration with the new, and easily accessible _Log View_
55+
- Log entries are inter-linked to the database objects configuration
56+
- Filter on log level (`ERROR`, `WARNING`, `INFO`, `VERBOSE`)
57+
- Extensive configuration
58+
- Exclude database objects (schemas, tables, columns, indexes, ...) from migration
59+
- Table editor to configure columns, constraints, indices, triggers, and partitions
60+
- Bulk change of data types (for example change all `NUMBER(4)` to `int`, instead of `smallint`)
61+
- Integrated code editor for functions, stored procedures, and views with diff feature
62+
63+
## Getting Started
64+
65+
### Requirements
66+
67+
_CYBERTEC Migrator_ is distributed as a set of [Docker](https://www.docker.com/) images that are brought up by [Docker Compose](https://docs.docker.com/compose/).
68+
69+
- [`docker`](https://docs.docker.com/get-docker/)
70+
- [`docker-compose`](https://docs.docker.com/compose/install/) (`>= 1.27.0`)
71+
- `git` (`>= 2.20.1`)
72+
- `bash` (`>= 4.0`)
73+
74+
### Obtaining Images
75+
76+
_CYBERTEC Migrator_ images can be obtained through Docker Hub.
77+
An offline installation package is also available for environments in which networking restrictions are imposed.
78+
79+
- Docker Hub
80+
Please [get in touch with us](#contact) if your account has not been granted access to the respective images.
81+
82+
```sh
83+
cat ~/password.txt | docker login --username <username> --password-stdin
84+
```
85+
86+
- Offline installation package
87+
Please [get in touch with us](#contact) to request download credentials.
88+
89+
### Setup
90+
91+
- Online installation
92+
93+
1. Clone the repository
94+
2. Change directory into cloned repository
95+
3. Generate default configuration
96+
4. Download images
97+
98+
<br/>
99+
100+
```sh
101+
git clone https://github.com/cybertec-postgresql/cybertec_migrator
102+
cd cybertec_migrator
103+
./migrator configure
104+
./migrator install
105+
```
106+
107+
- Offline installation
108+
109+
| 💡 | Installation archives also serve as upgrade archives |
110+
| --- | ---------------------------------------------------- |
111+
112+
1. Extract the provided archive file
113+
2. Change directory to the directory created in the previous step
114+
3. Generate default configuration
115+
4. Import images from archive
116+
117+
<br/>
118+
119+
```sh
120+
tar xf cybertec_migrator-vX.Y.Z.tar.gz
121+
cd cybertec_migrator
122+
./migrator configure
123+
./migrator install --archive ../cybertec_migrator-vX.Y.Z.tar.gz
124+
```
125+
126+
## Running the Migrator
127+
128+
```sh
129+
./migrator up
130+
```
131+
132+
CYBERTEC Migrator only supports connections via HTTP.
133+
134+
The `EXTERNAL_HTTP_PORT` variable in the `.env` file (generated by `./migrator configure`) controls on which port the Migrator is served.
135+
136+
### Upgrades
137+
138+
| ⚠️ | Running migrations _will_ be interrupted by applying upgrades |
139+
| --- | ------------------------------------------------------------- |
140+
141+
- Online upgrade
142+
143+
1. Update release information
144+
2. Upgrade to newest version
145+
3. Apply upgrade
146+
147+
<br/>
148+
149+
```sh
150+
./migrator update
151+
./migrator upgrade
152+
./migrator up
153+
```
154+
155+
- Offline upgrade
156+
157+
1. Update release information
158+
2. Upgrade to version bundled in archive
159+
3. Apply upgrade
160+
161+
<br/>
162+
163+
```sh
164+
./migrator update --archive cybertec_migrator-vX.Y.Z.tar.gz
165+
./migrator upgrade --archive cybertec_migrator-vX.Y.Z.tar.gz
166+
./migrator up
167+
```
168+
169+
## Contact
170+
171+
- [Sales](https://www.cybertec-postgresql.com/en/contact/)
172+
- [Report Bug](https://cybertec.atlassian.net/servicedesk/customer/portal/3/group/4/create/23)

docker-compose.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
version: "3"
2+
3+
services:
4+
# Single page application served via nginx web server
5+
web_gui:
6+
image: docker.io/cybertecpostgresql/cybertec_migrator-web_gui:${VERSION}
7+
depends_on:
8+
core:
9+
condition: service_started
10+
links:
11+
- core
12+
volumes:
13+
- ./docker/templates:/etc/nginx/templates
14+
ports:
15+
- ${EXTERNAL_HTTP_PORT}:80
16+
17+
# Migrator core exposed as REST service API
18+
core:
19+
image: docker.io/cybertecpostgresql/cybertec_migrator-core:${VERSION}
20+
environment:
21+
# —— Internal database ——
22+
- CORE_DB_HOST=core_db
23+
- CORE_DB_PASSWORD=${CORE_DB_PASSWORD}
24+
- CORE_DB_DATABASE=migrator
25+
# —— Job queue ——
26+
- CORE_QUEUE_HOST=core_queue
27+
depends_on:
28+
core_db:
29+
condition: service_healthy
30+
core_queue:
31+
condition: service_started
32+
links:
33+
- core_db
34+
- core_queue
35+
36+
# Internal Migrator database
37+
core_db:
38+
image: docker.io/postgres:13-alpine
39+
environment:
40+
# —— Postgres settings ——
41+
- POSTGRES_PASSWORD=${CORE_DB_PASSWORD}
42+
volumes:
43+
- core_db-data:/var/lib/postgresql/data
44+
- ./docker/initdb.sh:/docker-entrypoint-initdb.d/init-user-db.sh:Z
45+
healthcheck:
46+
# Ensures that the database is ready *and* the password is in sync
47+
test:
48+
[
49+
"CMD-SHELL",
50+
'psql --username=postgres --dbname=migrator --command="ALTER USER postgres WITH PASSWORD ''${CORE_DB_PASSWORD}''"',
51+
]
52+
interval: 5s
53+
timeout: 5s
54+
retries: 10
55+
56+
# Internal Migrator job queue
57+
core_queue:
58+
image: docker.io/redis:alpine
59+
command: ["redis-server", "--appendonly", "yes"]
60+
61+
volumes:
62+
core_db-data:

docker/initdb.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
DATABASE="migrator"
6+
SCHEMA="cybertec_migrator"
7+
8+
psql -v ON_ERROR_STOP=1 <<-EOF
9+
CREATE DATABASE ${DATABASE};
10+
EOF
11+
12+
psql -v ON_ERROR_STOP=1 --dbname "${DATABASE}" <<-EOF
13+
CREATE SCHEMA ${SCHEMA};
14+
EOF
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
upstream api {
2+
server core:3000;
3+
}
4+
5+
server {
6+
listen 80 default_server;
7+
8+
root /usr/share/nginx/html/;
9+
index index.html;
10+
11+
location / {
12+
try_files $uri /index.html;
13+
add_header Cache-Control no-store always;
14+
autoindex off;
15+
}
16+
17+
location /api/ {
18+
proxy_pass http://api/;
19+
proxy_redirect / /api/;
20+
absolute_redirect off;
21+
proxy_set_header Host $host;
22+
proxy_set_header X-Real-IP $remote_addr;
23+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
24+
proxy_set_header X-Forwarded-Host $server_name;
25+
}
26+
}

0 commit comments

Comments
 (0)