Skip to content
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

SO-Driver-29: Change of config folders names #32

Merged
merged 3 commits into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
.phpstorm.meta.php
composer.lock
/vagrant/
/config.d/
/.driver/
michalbiarda marked this conversation as resolved.
Show resolved Hide resolved
.DS_Store
sample/
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Installing Driver is easy:
composer require swiftotter/driver
```

Configuring Driver is easy. In the folder that contains your `vendor/` folder, create a folder called `config`.
Configuring Driver is easy. In the folder that contains your `vendor/` folder, create a folder called `.driver`.
First, you need to create an Amazon AWS account. We will be using RDS to perform the data manipulations. It is
recommended to create a new IAM user with appropriate permissions to access EC2, RDS and S3 (exact permissions
will be coming).
Expand Down Expand Up @@ -85,7 +85,7 @@ To tag an export with an issue number (or whatever is desired):

## Connection Information

Connection information goes into a folder named `config` or `config.d`. The files that are recognized
Connection information goes into a folder named `.driver`. The files that are recognized
inside these folders are:
* `pipelines.yaml`
* `commands.yaml`
Expand All @@ -103,10 +103,8 @@ stored in `/var/www/`. Your vendor directory is `/var/www/vendor/` and, of cours
`/var/www/vendor/swiftotter/driver`. As such, Driver will look in the following locations for configuration
files:

* `/var/www/config/`
* `/var/www/config.d/`
* `/var/www/vendor/*/*/config/`
* `/var/www/vendor/*/*/config.d/`
* `/var/www/.driver/`
* `/var/www/vendor/*/*/.driver/`

You can symlink any file you want here. Keep in mind that these files do contain sensitive information and
it is necessary to include a `.htaccess` into that folder:
Expand Down Expand Up @@ -245,7 +243,7 @@ pipelines:

### Creating a new pipeline

The following is taken from `config/pipelines.yaml`. You can put this code in any of the `yaml` files that Driver reads. Just ensure that the
The following is taken from `.driver/pipelines.yaml`. You can put this code in any of the `yaml` files that Driver reads. Just ensure that the
`pipelines` root node has no space in front of it (exactly as shown below).

```yaml
Expand Down Expand Up @@ -324,7 +322,7 @@ environments:

### Anonymizing Data

Tables can be anonyimized by creating `anonymize.yaml` in `config/`. The following type of anonymization entities are available in order to provide realistic data and types:
Tables can be anonyimized by creating `anonymize.yaml` in `.driver/`. The following type of anonymization entities are available in order to provide realistic data and types:

* `email`
* `company`
Expand Down
2 changes: 1 addition & 1 deletion src/Engines/MySql/Sandbox/Sandbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ private function getAwsParameters($type, $version)
];

if (empty($parameters['region'])) {
$this->output->writeln('<fg=blue>No region specified. Are you sure that config.d/connections.yaml exists?</>');
$this->output->writeln('<fg=blue>No region specified. Are you sure that .driver/connections.yaml exists?</>');
}

return $parameters;
Expand Down
3 changes: 1 addition & 2 deletions src/System/Configuration/FileCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ class FileCollector
{
private const FILE_EXTENSION = '.yaml';
private const ALLOWED_FOLDERS = [
'config',
'config.d'
'.driver'
];
private const ALLOWED_FILES = [
'anonymize',
Expand Down