Upgrade strategy for 1.4 to 1.14

I have inherited a Foreman 1.4 system running on Ubuntu Precise. I would
like to upgrade to the current Ubuntu LTS and current Foreman release. The
current installation uses a postgres database that is hosted on another
system. I do not want to try an in-place upgrade because I don't see a way
to test the upgrade. I have built a new database server. I have loaded the
current Foreman db on the new db server. I have also built a new Foreman
server and installed 1.14 on it, but when I attempt to migrate the database
'foreman-rake db:migrate' konks over dead with:

rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Unable to turn on
websockets_encrypt, either websockets_ssl_key or websockets_ssl_cert is
missing
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/validations.rb:79:in
`raise_record_invalid'

It there a simple solution to this problem? Is this a reasonable approach?
Should I install older versions of Foreman on the new server and set
through the upgrades?

Thanks in advance for any pointers.

Bill

Hi Bill,

Upgrades are only tested to work between following minor versions.
The best upgrade path would be to go one version at a time - i.e. 1.4 ->
1.5 -> 1.6 etc.

··· On Tue, Nov 29, 2016 at 12:04 AM, whm via Foreman users < foreman-users@googlegroups.com> wrote:

I have inherited a Foreman 1.4 system running on Ubuntu Precise. I would
like to upgrade to the current Ubuntu LTS and current Foreman release. The
current installation uses a postgres database that is hosted on another
system. I do not want to try an in-place upgrade because I don’t see a way
to test the upgrade. I have built a new database server. I have loaded the
current Foreman db on the new db server. I have also built a new Foreman
server and installed 1.14 on it, but when I attempt to migrate the database
’foreman-rake db:migrate’ konks over dead with:

rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Unable to turn on
websockets_encrypt, either websockets_ssl_key or websockets_ssl_cert is
missing
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-
4.2.7.1/lib/active_record/validations.rb:79:in `raise_record_invalid’

It there a simple solution to this problem? Is this a reasonable
approach? Should I install older versions of Foreman on the new server and
set through the upgrades?

Thanks in advance for any pointers.

Bill


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.


Have a nice day,
Tomer Brisker
Red Hat Engineering

One important place to look at is provisioning templates. If you did some
changes to them, you will need to reapply your changes after migration is
complete.
The templates were changed since 1.4, so you would have to manually merge
your changes and the latest template.

··· On Tuesday, November 29, 2016 at 11:01:49 AM UTC+2, w...@dropbox.com wrote: > > I have inherited a Foreman 1.4 system running on Ubuntu Precise. I would > like to upgrade to the current Ubuntu LTS and current Foreman release. The > current installation uses a postgres database that is hosted on another > system. I do not want to try an in-place upgrade because I don't see a way > to test the upgrade. I have built a new database server. I have loaded the > current Foreman db on the new db server. I have also built a new Foreman > server and installed 1.14 on it, but when I attempt to migrate the database > 'foreman-rake db:migrate' konks over dead with: > > rake aborted! > ActiveRecord::RecordInvalid: Validation failed: Unable to turn on > websockets_encrypt, either websockets_ssl_key or websockets_ssl_cert is > missing > /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/validations.rb:79:in > `raise_record_invalid' > ... > > It there a simple solution to this problem? Is this a reasonable > approach? Should I install older versions of Foreman on the new server and > set through the upgrades? > > Thanks in advance for any pointers. > > Bill >

The best approach would be to backup whole system first (make a snapshot if
you can) and then upgrade directly to 1.14 as you did. If you hit an issue,
read through ALL upgrade instructions for each individual version to work
on them.

I remember we were changing websocket settings, there should be a migration
for it. In the worst case you can delete those records (websockets%) from
settings table and revert settings.yaml to the defaults.

LZ

··· On Tue, Nov 29, 2016 at 10:17 AM, Tomer Brisker wrote:

Hi Bill,

Upgrades are only tested to work between following minor versions.
The best upgrade path would be to go one version at a time - i.e. 1.4 ->
1.5 -> 1.6 etc.

On Tue, Nov 29, 2016 at 12:04 AM, whm via Foreman users < > foreman-users@googlegroups.com> wrote:

I have inherited a Foreman 1.4 system running on Ubuntu Precise. I would
like to upgrade to the current Ubuntu LTS and current Foreman release. The
current installation uses a postgres database that is hosted on another
system. I do not want to try an in-place upgrade because I don’t see a way
to test the upgrade. I have built a new database server. I have loaded the
current Foreman db on the new db server. I have also built a new Foreman
server and installed 1.14 on it, but when I attempt to migrate the database
’foreman-rake db:migrate’ konks over dead with:

rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Unable to turn on
websockets_encrypt, either websockets_ssl_key or websockets_ssl_cert is
missing
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-4.2.
7.1/lib/active_record/validations.rb:79:in `raise_record_invalid’

It there a simple solution to this problem? Is this a reasonable
approach? Should I install older versions of Foreman on the new server and
set through the upgrades?

Thanks in advance for any pointers.

Bill


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.


Have a nice day,
Tomer Brisker
Red Hat Engineering


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.


Later,
Lukas @lzap Zapletal