I am trying to impelment flywaydb in our process. In our env each client has their own instance of the DB.
I have a bash that loops through the clients to run migrate. So the command looks like
flyway -url=jdbc:jtds:sqlserver://localhost:1434/main_client_$ID migrate
This all works when all the clients start from the baseline. But as we add new customers their DB will reflect the newest code. Now we have older clients started with V1(and all the migration scripts to V2) and new clients with the latest DB V2.
I thought i could do something like :::
flyway baseline -url=jdbc:jtds:sqlserver://localhost:1434/main_client_3
--baselineVersion=2 --baselineDescription="Base 2 version"
but when i do it this way then call info i see something like :
+---------+-----------------------+---------------------+---------+
| Version | Description | Installed on | State |
+---------+-----------------------+---------------------+---------+
| 1 | << Flyway Baseline >> | 2015-06-08 22:07:54 | Success |
| 1.1 | update | | Pending |
| 1.2.0 | update | | Pending |
| 1.2.1 | update | | Pending |
+---------+-----------------------+---------------------+---------+
if i look in the DB i see the version value of schema_version set to 1.
if via the DB i force schema_version column value to 1.2.0 i see
+---------+-----------------------+---------------------+---------+
| Version | Description | Installed on | State |
+---------+-----------------------+---------------------+---------+
| 1 | Base version initial | | <Baseln |
| 1.1 | update | | <Baseln |
| 1.2.0 | << Flyway Baseline >> | 2015-06-08 22:07:54 | Success |
| 1.2.1 | update | | Pending |
+---------+-----------------------+---------------------+---------+
This is what i want.
But i can not figure out how to set the value via the baseline command
Thanks for any help
All parameters should be passed in with - not --
Related
I just installed this plugin to monitor SQL errors:
https://mariadb.com/kb/en/sql-error-log-plugin/
but I can't for the life of me find anything on how to modify the default system variables for that error log plugin, and where.
Anyone?!
You can't modify error plugin log variables via SQL statements. They are either read-only and/or they need to be specified at startup (see source code).
So you have to pass these values either to mariadbd/mysqld or you have to specify these in your configuration file.
Example in /etc/my.cnf:
[server]
sql-error-log-filename=foo.log
sql-error-log-rotate=ON
restart server and check the values
MariaDB [test]> show variables like 'sql_error%';
+--------------------------+---------+
| Variable_name | Value |
+--------------------------+---------+
| sql_error_log_filename | foo.log |
| sql_error_log_rate | 1 |
| sql_error_log_rotate | ON |
| sql_error_log_rotations | 9 |
| sql_error_log_size_limit | 1000000 |
+--------------------------+---------+
I have this situation shown in the drawing.
I would like to configure the kubernetes pods so that they can talk to the external docker container "mysql", but I don't know how to configure it, especially regarding the IP address to tell them to connect to. I can't use "localhost" because that will just redirect back to the calling pod, I can't use 192.168.1.8 because the port is not exposed from there.
What is the DB Host IP in this case?
Thank you for any clues
+----------------------------------------------------------------------------------------------------------+
| |
| My Macbook Pro Laptop |
| |
| Today's DHCP IP: 192.168.1.8 |
| +-------------------------+ |
| | | |
| | K8s Cluster | |
| | | |
| | | |
| | K8s Pod | |
| | +---------------+ | |
| | | Docker | | |
| | | Container | | |
| | | +-----------+ | | |
| ??? | | | | | | |
| <-----------+ Foo | | | |
| +-------------+ | | | Program | | | |
| | Docker | | | | | | | |
| +-----------------------+ | container | Listening | | +-----------+ | | |
| | Local Hard Disk | | +---------+ | Port | +---------------+ | |
| | +------------------+ | | | | | 3306 | | |
| | | /Users/foo/data <------------- mysql <------+ | | |
| | | | | | | | | | K8s Pod | |
| | +------------------+ | | +---------+ | | +---------------+ | |
| +-----------------------+ +-------------+ | | Docker | | |
| | | Container | | |
| | | +-----------+ | | |
| ??? | | | | | | |
| <-----------+ Bar | | | |
| | | | Program | | | |
| | | | | | | |
| | | +-----------+ | | |
| | +---------------+ | |
| | | |
| | | |
| +-------------------------+ |
| |
| |
+----------------------------------------------------------------------------------------------------------+
Note Because of the current limitations of the kubernetes system available for MacOS, I cannot persist the data to the local hard disk (to a location of my choosing that I wish to specify) through kubernetes. I can do it however with Docker, so this is the only configuration I can find to achieve the desired goal of persisting the database files beyond the lifetime of the containers/pods
You can create External IP or External Name service with db host IP and call that service from POD.
Also other options is to deploy db as pod on k8 cluster with headless service.
Just out of curiosity, why you are deploying db as container using docker if you have k8 cluster?
I do not have OSX to test it, but that statement seems to be not true - that there is no way to persist data on Kubernetes for OSX. To do that you can just create a Persistent Volume which will be a resource in the cluster and then add PersistentVolumeClaim :
PV is is a resource in the cluster just like a node is a cluster
resource. PVs are volume plugins like Volumes, but have a lifecycle
independent of any individual pod that uses the PV.
PVC is a request for storage by a user. It is similar to a pod. Pods
consume node resources and PVCs consume PV resources. Pods can request
specific levels of resources (CPU and Memory). Claims can request
specific size and access modes (e.g., can be mounted once read/write
or many times read-only).
You can find explanation here. And how to here with step by step configuration of mySQL and in this case Wordpress.
About your setup, first try to follow the official documentation about running mySQL inside of the cluster (assuming you are using minikube, but if not there should't be much differences) if you do not succeed we will continue. I already started trying to connect from the inside of the cluster to mysql container outside (my setup is Ubuntu 18.04 with minikube).
Also you are right you won't be able to access it on localhost, because docker is actually using 172.17 (if I remember correctly) so you one of the options would be building new image and put host machine IP with exposed port.
WE have flyway integrated with Redshift and we are using this as a simple java main program to run all our schema migrations. We also use the info command to print the current version of the database, However this command successfully runs or at least appears to run but does not print the version number.
We have version 4.2 of the flyway jar. What is that we may be missing? Thanks
To manually recreate what the info command line option does in java code you can copy what its implementation does (from the source):
MigrationInfoDumper.dumpToAsciiTable(flyway.info().all())
An example from the docs is shown below:
+-------------+------------------------+---------------------+---------+
| Version | Description | Installed on | State |
+-------------+------------------------+---------------------+---------+
| 1 | Initial structure | | Pending |
| 1.1 | Populate table | | Pending |
| 1.3 | And his brother | | Pending |
+-------------+------------------------+---------------------+---------+
I m installing orocrm so i have an error during the installation process
this is my command php app/console oro:install error is [Symfony\Component\Process\Exception\RuntimeException]
The process timed-out.
i have check the oro_install.log file there is no any error
here is the instrucktion page i have followed http://www.orocrm.com/documentation/index/current/book/installation
thanks
this is my console
root#efttt-Intron-5t59:/home/eures/tance/crm-application/orocrm# php app/console oro:install
Installing Oro Application.
Oro requirements check:
+---------+------------------------------------------------------------------------------------------+ | Check | Mandatory requirements
|
+---------+------------------------------------------------------------------------------------------+ | OK | Vendor libraries must be installed
| | OK | app/cache/ directory must be writable
| | OK | app/logs/ directory must be writable
| | OK | Configured default timezone "Asia/Colombo" must be
supported by your installation of PHP | | OK | json_encode() must
be available
| | OK | session_start() must be available
| | OK | ctype_alpha() must be available
| | OK | token_get_all() must be available
| | OK | simplexml_import_dom() must be available
| | OK | PCRE extension must be available
| | OK | Cache folder should not be inside encrypted directory
|
+---------+------------------------------------------------------------------------------------------+
+---------+--------------------------------------------+ | Check | PHP settings |
+---------+--------------------------------------------+ | OK | date.timezone setting must be set | | OK |
detect_unicode must be disabled in php.ini | | OK | memory_limit
should be at least 512M |
+---------+--------------------------------------------+
+---------+------------------------------------------------------------------+ | Check | Oro specific requirements
|
+---------+------------------------------------------------------------------+ | OK | PHP version must be at least 5.4.9 (5.6.11-1ubuntu3.1
installed) | | OK | GD extension must be at least 2.0
| | OK | cURL extension must be at least 7.0
| | OK | mcrypt_encrypt() should be available
| | OK | intl extension should be available
| | OK | icu library must be at least 3.8
| | OK | web/uploads/ directory must be writable
| | OK | web/media/ directory must be writable
| | OK | web/bundles/ directory must be writable
| | OK | app/attachment/ directory must be writable
| | OK | web/js directory must be writable
| | OK | web/css directory must be writable
| | OK | app/config/parameters.yml file must be writable
|
+---------+------------------------------------------------------------------+
+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Check | Optional recommendations
|
+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | OK | Requirements file should be up-to-date
| | OK | When using the logout handler from the Symfony Security
Component, you should have at least PHP 5.4.11 due to PHP bug #63379
(as a workaround, you can also set invalidate_session to false in the
security logout handler configuration) | | OK | PCRE extension
should be at least version 8.0 (8.35 installed)
| | OK | PHP-XML module should be installed
| | OK | mb_strlen() should be available
| | OK | iconv() should be available
| | OK | utf8_decode() should be available
| | OK | posix_isatty() should be available
| | OK | intl extension should be available
| | OK | intl extension should be correctly configured
| | OK | intl ICU version should be at least 4+
| | OK | a PHP accelerator should be installed
| | OK | short_open_tag should be disabled in php.ini
| | OK | magic_quotes_gpc should be disabled in php.ini
| | OK | register_globals should be disabled in php.ini
| | OK | session.auto_start should be disabled in php.ini
| | OK | PDO should be installed
| | OK | PDO should have some drivers installed (currently
available: dblib, mysql, odbc)
| | OK | SOAP extension should be installed (API calls)
| | OK | A JS Engine (node) is installed
|
+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Dropping database schema... Database schema dropped successfully!
Clear the entity config cache Clear the extended entity cache Setting
up database. Process migrations...
Oro\Bundle\MigrationBundle\Migration\CreateMigrationTableMigration
Oro\Bundle\OrganizationBundle\Migrations\Schema\OroOrganizationBundleInstaller
Oro\Bundle\SecurityBundle\Migrations\Schema\v1_0\OroSecurityBundle
Oro\Bundle\AttachmentBundle\Migrations\Schema\OroAttachmentBundleInstaller
Oro\Bundle\EmailBundle\Migrations\Schema\OroEmailBundleInstaller
Oro\Bundle\UserBundle\Migrations\Schema\OroUserBundleInstaller
Oro\Bundle\SSOBundle\Migrations\Schema\OroUserBundleInstaller
Oro\Bundle\EntityConfigBundle\Migrations\Schema\OroEntityConfigBundleInstaller
Oro\Bundle\EntityConfigBundle\Migrations\Schema\v1_3\OroEntityConfigBundle
Oro\Bundle\EntityConfigBundle\Migrations\Schema\v1_4\FixOptionSetObjects
Oro\Bundle\EntityConfigBundle\Migrations\Schema\v1_5\DropFieldConfig
Oro\Bundle\EntityExtendBundle\Migrations\Schema\OroEntityExtendBundleInstaller
Oro\Bundle\EntityExtendBundle\Migrations\Schema\v1_3\OroEntityExtendBundle
Oro\Bundle\IntegrationBundle\Migrations\Schema\OroIntegrationBundleInstaller
Oro\Bundle\ActivityBundle\Migrations\Schema\OroActivityBundleInstaller
Oro\Bundle\ActivityListBundle\Migrations\Schema\OroActivityListBundleInstaller
Oro\Bundle\AddressBundle\Migrations\Schema\OroAddressBundleInstaller
Oro\Bundle\BatchBundle\Migrations\Schema\OroBatchBundleInstaller
Oro\Bundle\CalendarBundle\Migrations\Schema\OroCalendarBundleInstaller
Oro\Bundle\CalendarBundle\Migrations\Schema\v1_9\OroCalendarBundle
Oro\Bundle\ConfigBundle\Migrations\Schema\OroConfigBundleInstaller
Oro\Bundle\CronBundle\Migrations\Schema\v1_0\OroCronBundle
Oro\Bundle\CronBundle\Migrations\Schema\v1_0\JmsJob
Oro\Bundle\CronBundle\Migrations\Schema\v1_1\JmsJob
Oro\Bundle\DataAuditBundle\Migrations\Schema\OroDataAuditBundleInstaller
Oro\Bundle\DataGridBundle\Migrations\Schema\OroDataGridBundleInstaller
Oro\Bundle\EmbeddedFormBundle\Migrations\Schema\OroEmbeddedFormBundleInstaller
Oro\Bundle\ImapBundle\Migrations\Schema\v1_0\OroImapBundle
Oro\Bundle\ImapBundle\Migrations\Schema\v1_1\OroImapBundle
Oro\Bundle\ImapBundle\Migrations\Schema\v1_2\OroImapBundle
Oro\Bundle\InstallerBundle\Migrations\Schema\OroInstallerBundle
Oro\Bundle\MigrationBundle\Migrations\Schema\v1_0\OroMigrationBundle
Oro\Bundle\MigrationBundle\Migrations\Schema\v1_1\OroMigrationBundle
Oro\Bundle\NoteBundle\Migrations\Schema\v1_0\OroNoteBundle
Oro\Bundle\NoteBundle\Migrations\Schema\v1_1\OroNoteBundle
Oro\Bundle\NotificationBundle\Migrations\Schema\OroNotificationBundleInstaller
Oro\Bundle\ReportBundle\Migrations\Schema\OroReportBundleInstaller
Oro\Bundle\SearchBundle\Migrations\Schema\OroSearchBundleInstaller
Oro\Bundle\SegmentBundle\Migrations\Schema\OroSegmentBundleInstaller
Oro\Bundle\SidebarBundle\Migrations\Schema\v1_0\OroSidebarBundle
Oro\Bundle\SidebarBundle\Migrations\Schema\v1_1\OroSidebarBundle
Oro\Bundle\TagBundle\Migrations\Schema\OroTagBundleInstaller
Oro\Bundle\TranslationBundle\Migrations\Schema\OroTranslationBundleInstaller
Oro\Bundle\WindowsBundle\Migrations\Schema\v1_0\OroWindowsBundle
Oro\Bundle\WorkflowBundle\Migrations\Schema\OroWorkflowBundleInstaller
Oro\Bundle\CommentBundle\Migrations\Schema\v1_0\OroCommentBundle
Oro\Bundle\DashboardBundle\Migrations\Schema\OroDashboardBundleInstaller
Oro\Bundle\NavigationBundle\Migrations\Schema\v1_0\OroNavigationBundle
Oro\Bundle\NavigationBundle\Migrations\Schema\v1_1\OroNavigationBundle
Oro\Bundle\NavigationBundle\Migrations\Schema\v1_2\OroNavigationBundle
Oro\Bundle\NavigationBundle\Migrations\Schema\v1_3\OroNavigationBundle
OroCRM\Bundle\ContactBundle\Migrations\Schema\OroCRMContactBundleInstaller
OroCRM\Bundle\AccountBundle\Migrations\Schema\OroCRMAccountBundleInstaller
-------------------------------------------------------------------- >"Symfony\Component\Process\Exception\RuntimeException The process
timed-out."
probably due to dev log messages, try with the prod symfony env:
php app/console oro:install --env=prod
In the installation instruction on the github project page mention this note also:
Note: If the installation process times out, add the --timeout=0
argument to the command.
Hope this help
Rackspace Linux cloud servers now set OS-DCF:diskConfig to MANUAL when using nova. This means that the full drive isn't partitioned.
19:29:48 ~$ nova boot server01 --image 62df001e-87ee-407c-b042-6f4e13f5d7e1 --flavor performance2-60 --poll --key-name kylepub
+------------------------+---------------------------------------------+
| Property | Value |
+------------------------+---------------------------------------------+
| status | BUILD |
| updated | 2013-11-16T01:29:58Z |
| OS-EXT-STS:task_state | scheduling |
| key_name | kylepub |
| image | Ubuntu 13.04 (Raring Ringtail) (PVHVM beta) |
| hostId | |
| OS-EXT-STS:vm_state | building |
| flavor | 60 GB Performance |
| id | 9bd6aaac-bbdd-4644-821d-fb697fd48091 |
| user_id | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
| name | server01 |
| adminPass | XXXXXXXXXXXX |
| tenant_id | 864477 |
| created | 2013-11-16T01:29:58Z |
| OS-DCF:diskConfig | MANUAL |
| accessIPv4 | |
| accessIPv6 | |
| progress | 0 |
| OS-EXT-STS:power_state | 0 |
| config_drive | |
| metadata | {} |
+------------------------+---------------------------------------------+
How do I set OS-DCF:diskConfig to auto so the full disk is partitioned automatically?
Make sure you have os-diskconfig-python-novaclient-ext installed. If it's not, pip install it! It should come as part of installing rackspace-novaclient.
$ pip install os-diskconfig-python-novaclient-ext
Next up, use the --disk-config=AUTO option:
$ nova boot server01 --disk-config=AUTO --image 62df001e-87ee-407c-b042-6f4e13f5d7e1 --flavor performance2-60
Note that this is an extension by Rackspace, so if this is for a separate OpenStack deployment your provider needs the server side extension as well.
Big note: If you do the partitioning yourself, you are able to have non-EXT3 file systems, multiple partitions, and it lets you manage the disk configuration.