Migration from Foreman 1.5.3 to Katello 2.4

Hello everybody,

we have Foreman 1.5.3 installed on a server with a lot of hosts etc. and
want to install Katello to provide more features in near future.

Foreman-Old:
Version: 1.5.3
OS: CentOS 6.7
DB_Type: MySQL

Foreman/Katello:
Version: 2.4
OS: CentOS 7.1
DB_Type: Postgresql (cause katello not supporting mysql right now)

What would be the best way to migrate?

Greets,
Denis

i found out that there are some ruby mechanics implemented in foreman for
example "foreman-rake". Right now im trying:
On Foreman-Old:
foreman-rake db:schema:dump, this creates a dump file of the foreman
database.

On Foreman-New/Katello:
foreman-rake db:import_dump file=foreman.1459868537.sql, but no luck. Im
getting an Error: pg_restore: [archiver] could not open input file
"foreman.1459868537.sql": No such file or directory.

So i tried another way.
On Foreman-Old:
mysqldump --compatible=postgresql foreman > /tmp/foreman-$(date -I).sql

On Foreman-New/Katello i run an installer to recreate a blank foreman
database and tried to import that created dump manully into the foreman
database:
psql -U postgres -h localhost -W foreman < foreman-2016-04-06.sql

but im getting errors:

ERROR: relation "usergroups" does not exist
ZEILE 1: INSERT INTO "usergroups" VALUES (1,'test','2014-03-31 10:14:…



and so on…

··· Am Dienstag, 5. April 2016 11:08:02 UTC+2 schrieb Denis Müller: > > Hello everybody, > > we have Foreman 1.5.3 installed on a server with a lot of hosts etc. and > want to install Katello to provide more features in near future. > > Foreman-Old: > Version: 1.5.3 > OS: CentOS 6.7 > DB_Type: MySQL > > Foreman/Katello: > Version: 2.4 > OS: CentOS 7.1 > DB_Type: Postgresql (cause katello not supporting mysql right now) > > What would be the best way to migrate? > > Greets, > Denis > > >

im trying right now another way.

im changing on each host the puppet-server to my new katello installation.
So i am able to sing new hosts in katello/puppet, but after that i can't
see any new hosts in web gui of foreman.

··· > >

If they're registering with puppet, they aren't getting an Organization or
Location set most likely. You'll want to change your view to Any
Organization and Any Location and assign appropriately.

Matt

··· On Wed, Apr 6, 2016 at 7:26 AM, 'Denis Müller' via Foreman users < foreman-users@googlegroups.com> wrote:

im trying right now another way.

im changing on each host the puppet-server to my new katello installation.
So i am able to sing new hosts in katello/puppet, but after that i can’t
see any new hosts in web gui of foreman.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

> i found out that there are some ruby mechanics implemented in foreman for
> example "foreman-rake". Right now im trying:
> On Foreman-Old:
> foreman-rake db:schema:dump, this creates a dump file of the foreman
> database.
>
> On Foreman-New/Katello:
> foreman-rake db:import_dump file=foreman.1459868537.sql, but no luck. Im
> getting an Error: pg_restore: [archiver] could not open input file
> "foreman.1459868537.sql": No such file or directory.
>
>
> So i tried another way.
> On Foreman-Old:
> mysqldump --compatible=postgresql foreman > /tmp/foreman-$(date -I).sql
>
> On Foreman-New/Katello i run an installer to recreate a blank foreman
> database and tried to import that created dump manully into the foreman
> database:
> psql -U postgres -h localhost -W foreman < foreman-2016-04-06.sql
>
> but im getting errors:
>
> ERROR: relation "usergroups" does not exist
> ZEILE 1: INSERT INTO "usergroups" VALUES (1,'test','2014-03-31 10:14:…
> …
> …
> …
> and so on…
>
>
>
> You might have better luck with [1], under the section Switching from
SQLite to MySQL/PostgreSQL while maintaining existing data.

however, there is no direct foreman -> foreman+katello migration just yet,
the katello team is working on such change, but its not fully supported,
warning dragons ahead.

Ohad

[1] http://www.theforeman.org/manuals/1.11/#3.5.3DatabaseSetup

··· On Wed, Apr 6, 2016 at 11:17 AM, 'Denis Müller' via Foreman users < foreman-users@googlegroups.com> wrote:

Am Dienstag, 5. April 2016 11:08:02 UTC+2 schrieb Denis Müller:

Hello everybody,

we have Foreman 1.5.3 installed on a server with a lot of hosts etc. and
want to install Katello to provide more features in near future.

Foreman-Old:
Version: 1.5.3
OS: CentOS 6.7
DB_Type: MySQL

Foreman/Katello:
Version: 2.4
OS: CentOS 7.1
DB_Type: Postgresql (cause katello not supporting mysql right now)

What would be the best way to migrate?

Greets,
Denis


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

> If they're registering with puppet, they aren't getting an Organization or
> Location set most likely. You'll want to change your view to Any
> Organization and Any Location and assign appropriately.
>

AFAIR there is a custom fact you can set with their org / loc name, so they
can auto import into the right context.

Ohad

··· On Wed, Apr 6, 2016 at 4:35 PM, Matthew Hyclak wrote:

Matt

On Wed, Apr 6, 2016 at 7:26 AM, ‘Denis Müller’ via Foreman users < > foreman-users@googlegroups.com> wrote:

im trying right now another way.

im changing on each host the puppet-server to my new katello
installation. So i am able to sing new hosts in katello/puppet, but after
that i can’t see any new hosts in web gui of foreman.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

If you have only one Organisation and Location it could be done very
simple. Under Foreman-Settings-Puppet, there u can set default Org and
Location. All new Hosts would be linked to that.

··· Am Mittwoch, 6. April 2016 16:06:21 UTC+2 schrieb ohad: > > > > On Wed, Apr 6, 2016 at 4:35 PM, Matthew Hyclak > wrote: > >> If they're registering with puppet, they aren't getting an Organization >> or Location set most likely. You'll want to change your view to Any >> Organization and Any Location and assign appropriately. >> > > AFAIR there is a custom fact you can set with their org / loc name, so > they can auto import into the right context. > > Ohad > >> >> Matt >> >> On Wed, Apr 6, 2016 at 7:26 AM, 'Denis Müller' via Foreman users < >> forema...@googlegroups.com > wrote: >> >>> im trying right now another way. >>> >>> im changing on each host the puppet-server to my new katello >>> installation. So i am able to sing new hosts in katello/puppet, but after >>> that i can't see any new hosts in web gui of foreman. >>> >>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Foreman users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to foreman-user...@googlegroups.com . >>> To post to this group, send email to forema...@googlegroups.com >>> . >>> Visit this group at https://groups.google.com/group/foreman-users. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at https://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/d/optout. >> > >