Update Tethys Production Server to 2.0

29 views
Skip to first unread message

haonr...@gmail.com

unread,
Mar 1, 2018, 5:58:29 PM3/1/18
to Tethys Platform

Hi Guys,


I was wondering if there is a seamless way to upgrade a server to Tethys 2.0 production environment without losing the settings and my custom Tethys portal. It seems like it’s going to have to be an uninstall the older production and redo the mail server and everything from scratch, does that sound right?

 

Thanks for any feedback


Noah

swainn

unread,
Mar 5, 2018, 11:22:06 AM3/5/18
to Tethys Platform
What have you modified to make your portal custom? Probably a good strategy would be to move your modified version to a new branch. Then pull the latest release version of Tethys and merge it into your custom branch. Just use your custom branch for production/development instead of the the main release/master branches. In terms of the settings file, you will need to generate a new one. Just save a copy of your original settings file before you generate a new one. Then use the old copy to fill in the settings. We should develop a way to migrate settings between versions though.

haonr...@gmail.com

unread,
Mar 13, 2018, 6:40:03 PM3/13/18
to Tethys Platform
Thanks, Nathan! I went ahead and pulled / worked off what you suggested. I did run into one error that says the following. I did make sure I copied over the right variable items in settings.py and tried to track down the root of this but thought you might know. If not, that's ok, I'll keep looking and post what I end up doing as a response to this.

  File "manage.py", line 20, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/tethys/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/usr/lib/tethys/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 303, in execute
    settings.INSTALLED_APPS
  File "/usr/lib/tethys/local/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
    self._setup(name)
  File "/usr/lib/tethys/local/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/lib/tethys/local/lib/python2.7/site-packages/django/conf/__init__.py", line 99, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named settings

Scott Christensen

unread,
Mar 13, 2018, 10:04:26 PM3/13/18
to haonr...@gmail.com, Tethys Platform
Noah, 

Where is your settings file? In Tethys 2.0 it should be in the tethys_portal dir, which is different from where it was in 1.x.


--
You received this message because you are subscribed to the Google Groups "Tethys Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tethysplatfor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tethysplatform/dc79c8df-cce4-420f-ab10-442069ea934c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

haonr...@gmail.com

unread,
Mar 14, 2018, 1:51:19 PM3/14/18
to Tethys Platform
Scott, thanks for your input. I realized after you asked that that I was going about the Tethys Update for the production the wrong way. I had pulled an update to the Tethys 1.x src folder and followed the previous "Update Tethys" instructions but realized I wouldn't have conda and the other new dependencies. I installed the Tethys 2.0 with the flags of -production and -skip-tethys-install so that I could try and connect to my preexisting docker database for my Tethys users but it seems to be confused now. I got passed the previous error but now when I run tethys commands after activating the new installation tethys environement it gives me an error (see screenshot).. Not sure what's going on but I might just have to do a clean install

sdc50

unread,
Mar 14, 2018, 2:30:02 PM3/14/18
to Tethys Platform
I'm not sure why you would be getting that error. How did you set up your conda environment? Unfortunately, I think we dropped the ball in writing the documentation for upgrading from 1.4 to 2.0. If I remember correctly there are a couple of migrations steps to update your database because of the Django-social-auth library (see https://groups.google.com/d/msg/tethysplatform/tVo9Fsy0cwM/Y6Zt0qajFgAJ). Do you still have a working version of 1.4 running on your sever? 

haonr...@gmail.com

unread,
Mar 19, 2018, 8:06:28 AM3/19/18
to Tethys Platform

Hi Scott,

It's been a long couple days trying to figure out the production installation / changes. I ended up giving up trying to preserve my previous Tethys installation on this staging server but I'm going to try to preserve what I can on my production server (i don't want to lose all my users in the tethys db) but I'll worry about that later.. So Apache is not being used any longer, is that correct? It's not super clear in the docs if the NGINX is installed when tethys is installed or if we have to install it and connect it separately? I've installed Tethys several times and kept referencing the Apache logs but I was never able to see the Tethys portal so I suppose it's related to NGINX. Sorry for bugging you with these questions, hopefully anybody else running into production installation issues will find this.

Thanks,
Noah

Scott Christensen

unread,
Mar 19, 2018, 1:04:59 PM3/19/18
to haonr...@gmail.com, Tethys Platform
Noah,

I'm sorry for the issues you've been running into trying to migrate to 2.0. I definitely want to make sure that you don't loose your production database so we should be sure we have a clear path to migrating that. 

As for NGINX, it should be automatically installed if you run the installation script with the production flag. The previous configuration with Apache and ModWSGI didn't work with the new conda environment so we switched to using uWSGI as the application server and Nginx as a proxy. I believe that you could use Apache as a proxy in place of Nginx, but I haven't tried it; Nginx is well suited to being used as a proxy and is easy to configure, so that is the default configuration.

It would be helpful if you could give me a few more details about the type of server (including the version) you are using (Ubuntu?, CentOS, Redhad?). It would also help if you could send the command line flags that you specified when you ran the installation script. That would help me know what you  should have configured and how it should be working.

--
You received this message because you are subscribed to the Google Groups "Tethys Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tethysplatfor...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages