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

Update the "Configuration and Deployment Guide for v2.x" Document #125

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

gorgwu
Copy link

@gorgwu gorgwu commented Apr 6, 2024

Description:

Updated the "Configuration and Deployment Guide for v2.x" Document

Issue fixed:

Issue 118

Changes done:

  • generally cleaned up some text and broken url
  • added text near the top mentioning the official docker image should be used unless there's a good reason
  • updated text from Debian 9 to Ubuntu 22.04
  • updated text from JDK 8 to 11
  • updated text from MySQL Connector/J 5.1.46 to 8.3.0
  • updated text for download locations for oba from 2.0.0 to CURRENTVERS (and let users know to take the current version found at the top of the downloads page)
  • updated xml files (assuming Google Maps variables, FEED_API_KEY, and FEED_API_VALUE are not being filled at runtime to try and match the outdated xml files as closely as possible)

Screenshots/Videos

✅️ By submitting this PR, I have verified the following

  • Checked to see if a similar PR has already been opened 🤔️
  • Reviewed the contributing guidelines 🔍️
  • Tried squashing the commits into one

@gorgwu gorgwu marked this pull request as draft April 6, 2024 04:21
@gorgwu gorgwu changed the title Update the "Configuration and Deployment Guide for v2.x" Document Update the "Configuration and Deployment Guide for v2.x" Document Draft Apr 6, 2024
Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good! I have a few notes but i like what I see :)


When setting up Debian 9 using the installer, be certain not to install any additional components except for the SSH server and standard system utilities. You can probably get away with including more on the server but this guide is written with a clean, lightweight server environment in mind and making your server the same will help insure success. Also, the less that is running on the server, the more resources available for OneBusAway.
When setting up Debian 9 using the installer, be certain to not install any additional components except for the SSH server and standard system utilities. You can likely include more on the server but this guide is written with a clean, lightweight server environment in mind and making your server the same will help ensure success. Also, the less that is running on the server, the more resources available for OneBusAway.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debian 9 hasn't received any security updates for almost two years. This guide should be updated to use either:

  • Debian 12, which will receive security updates until 2028. https://wiki.debian.org/LTS
  • Ubuntu 22.04, which is what the docker image is using, and is also an LTS release

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, thanks. I'll make those changes and then submit a new PR with all the commits squashed properly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can keep the same PR. All of the commits can be squashed in here before merge

@@ -72,19 +74,19 @@ If you are keen to make changes to the source code of OBA, please see the [Enter
**Please note:** If you build the binaries instead of downloading them, the paths in the remaining commands in this guide may vary from the actual locations of the built binaries. You will need to adjust the paths in the commands accordingly.

### Download the Binaries
You can download pre-compiled binaries for OneBusAway from: http://nexus.onebusaway.org/nexus/content/groups/public/org/onebusaway/. If you wish to browse the repository to hand pick the version you want to use, make sure to download the *onebusaway-transit-data-federation-webapp*, *onebusaway-api-webapp* and *onebusaway-enterprise-acta-webapp* files that resulted from the same version build. This can be determined based on the name of the directory which reflects the respective version name of the build (e.g. 2.0.0-SNAPSHOT) that each individual jar or war files are located in. **Note:** Some versions of OBA are not compatible with Tomcat 8 and Java 8, you may need to use an older OS and older version of Java.
You can download pre-compiled binaries for OneBusAway from: http://nexus.onebusaway.org/nexus/content/groups/public/org/onebusaway/. If you wish to browse the repository to handpick the version you want to use, make sure to download the *onebusaway-transit-data-federation-webapp*, *onebusaway-api-webapp* and *onebusaway-enterprise-acta-webapp* files that resulted from the same version build. This can be determined based on the name of the directory which reflects the respective version name of the build (e.g. 2.0.0-SNAPSHOT) that each individual jar or war files are located in. **Note:** Some versions of OBA are not compatible with Tomcat 8 and Java 11, you may need to use an older OS and older version of Java.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This URL should be updated to https://developer.onebusaway.org/downloads

wget https://repo.camsys-apps.com/releases/org/onebusaway/onebusaway-transit-data-federation-webapp/2.0.0/onebusaway-transit-data-federation-webapp-2.0.0.war
wget https://repo.camsys-apps.com/releases/org/onebusaway/onebusaway-api-webapp/2.0.0/onebusaway-api-webapp-2.0.0.war
wget https://repo.camsys-apps.com/releases/org/onebusaway/onebusaway-enterprise-acta-webapp/2.0.0/onebusaway-enterprise-acta-webapp-2.0.0.war
wget https://repo.camsys-apps.com/releases/org/onebusaway/onebusaway-transit-data-federation-builder/2.4.18-cs/onebusaway-transit-data-federation-builder-2.4.18-cs-withAllDependencies.jar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these URLs should probably be dynamically composed in the same way that the URLs on the downloads page are. (or you can punt and tell the user to wget the relevant dependencies using the downloads page links)


cd /oba/gtfs
java -jar -Xss4m -Xmx1g \
/oba/onebusaway-transit-data-federation-builder-2.0.0-20180106.064533-47-withAllDependencies.jar \
/oba/onebusaway-transit-data-federation-builder-2.4.18-cs-withAllDependencies.jar \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

mv /oba/onebusaway-transit-data-federation-webapp-2.0.0.war /var/lib/tomcat8/webapps/onebusaway-transit-data-federation-webapp
jar xvf /var/lib/tomcat8/webapps/onebusaway-transit-data-federation-webapp/onebusaway-transit-data-federation-webapp-2.0.0.war
rm -rf /var/lib/tomcat8/webapps/onebusaway-transit-data-federation-webapp/onebusaway-transit-data-federation-webapp-2.0.0.war
mv /oba/onebusaway-transit-data-federation-webapp-2.4.18-cs.war /var/lib/tomcat8/webapps/onebusaway-transit-data-federation-webapp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

mv /oba/onebusaway-api-webapp-2.0.0-20180106.064748-47.war /var/lib/tomcat8/webapps/onebusaway-api-webapp/
jar xvf /var/lib/tomcat8/webapps/onebusaway-api-webapp/onebusaway-api-webapp-2.0.0-20180106.064748-47.war
rm -rf /var/lib/tomcat8/webapps/onebusaway-api-webapp/onebusaway-api-webapp-2.0.0-20180106.064748-47.war
mv /oba/onebusaway-api-webapp-2.4.18-cs.war /var/lib/tomcat8/webapps/onebusaway-api-webapp/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above


Take note of the last bean in the XML. This is an API key for testing purposes. It is very important to either change the key or remove it entirely before making your OBA installation live. If you want to allow users to connect to your OBA instance with the various OBA apps, you must include additional beans that have the default API keys for the respective app. You can get the code for these beans from this file before you replace its contents.
Take note of the second-last bean in the XML. This is an API key for testing purposes. It is very important to either change the key or remove it entirely before making your OBA installation live. If you want to allow users to connect to your OBA instance with the various OBA apps, you must include additional beans that have the default API keys for the respective app. You can get the code for these beans from this file before you replace its contents.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: second-to-last

mv /oba/onebusaway-enterprise-acta-webapp-2.0.0-20180106.065008-42.war /var/lib/tomcat8/webapps/ROOT/
jar xvf /var/lib/tomcat8/webapps/ROOT/onebusaway-enterprise-acta-webapp-2.0.0-20180106.065008-42.war
rm -rf /var/lib/tomcat8/webapps/ROOT/onebusaway-enterprise-acta-webapp-2.0.0-20180106.065008-42.war
mv /oba/onebusaway-enterprise-acta-webapp-2.4.18-cs.war /var/lib/tomcat8/webapps/ROOT/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@gorgwu gorgwu changed the title Update the "Configuration and Deployment Guide for v2.x" Document Draft Update the "Configuration and Deployment Guide for v2.x" Document Apr 8, 2024
@gorgwu
Copy link
Author

gorgwu commented Apr 8, 2024

I think I covered everything requested, let me know how it looks.

Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! One minor tweak near the top, plus some investigation for you, potentially. Also, I meant to ask: have you run through this guide on an installation of Ubuntu 22.04 to ensure that everything works as expected?

@@ -5,42 +5,44 @@ layout: page

<div class='bg-blue-50 border-blue-500 dark:bg-slate-800 p-4 rounded-md'>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should remove this top <div>. I added this to the guide in order to clarify how out of date it was, and your changes fix that! Once this gets merged and deployed, I'll update the wiki to point to this guide as the new canonical source.

wget https://repo.camsys-apps.com/releases/org/onebusaway/onebusaway-api-webapp/CURRENTVERS/onebusaway-api-webapp-CURRENTVERS.war
wget https://repo.camsys-apps.com/releases/org/onebusaway/onebusaway-enterprise-acta-webapp/CURRENTVERS/onebusaway-enterprise-acta-webapp-CURRENTVERS.war

In the above command, note **CURRENTVERS**. Replace these with the current version, found at the top of the [Downloads](/downloads) page.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping we could actually dynamically substitute in the the value of oba_version from site_metadata.yml here, but if that isn't immediately feasible, that's ok.

@gorgwu
Copy link
Author

gorgwu commented Apr 8, 2024

Looking good! One minor tweak near the top, plus some investigation for you, potentially. Also, I meant to ask: have you run through this guide on an installation of Ubuntu 22.04 to ensure that everything works as expected?

Ah, I see. I'll open a separate issue and pull request to look into dynamically composing it all at a later point, around 2 weeks from now, just so I can wrap up my school year first. This won't be happening over the summer but exams are the main focus for me right now 😓

Should I run through the guide now on Ubuntu 22.04? I haven't done it yet. I think i've been using Ubuntu 22.04 for running the docs website, should I start with a clean slate or is having ruby/node/yarn fine?

@aaronbrethorst
Copy link
Member

Ah, I see. I'll open a separate issue and pull request to look into dynamically composing it all at a later point, around 2 weeks from now, just so I can wrap up my school year first. This won't be happening over the summer but exams are the main focus for me right now 😓

sounds good!

Should I run through the guide now on Ubuntu 22.04? I haven't done it yet. I think i've been using Ubuntu 22.04 for running the docs website, should I start with a clean slate or is having ruby/node/yarn fine?

yes please; I think you're probably fine as-is. no need for a clean slate

@gorgwu
Copy link
Author

gorgwu commented Apr 8, 2024

I'm getting the following screen when running this command during my download of MySQL:
sudo gdebi mysql-apt-config_0.8.6-1_all.deb
image
and then these lines when aborting:
image
Any thoughts? My best guess is package vers. 0.8.6-1 isn't the right version, but I can't find much online. Just to be sure it wasn't Ubuntu, I reinstalled it but the exact same thing happens.

@aaronbrethorst
Copy link
Member

Googling the first sentence of that error message reveals this issue here, which should shed some light on the issue: https://bugs.mysql.com/bug.php?id=107198

Also, going to the MySQL download page referenced in that issue shows that Ubuntu 22.04 is now listed: https://dev.mysql.com/downloads/mysql/

@gorgwu
Copy link
Author

gorgwu commented Apr 9, 2024

I'm currently going through the rest of the guide, although I'm using Tomcat 9 instead of 8 since trying to install 8 returns "Unable to locate package tomcat8" and only 9 seems to be in the repo for 22.04.

Just wondering if this is fine and I can edit the guide to use Tomcat 9, or if it's better to tell the user to wget Tomcat 8?

@aaronbrethorst
Copy link
Member

If you can get Tomcat 9 to work, then go for it! Heck, if you can get OBA to run on Tomcat 10, that would be even better!

@gorgwu
Copy link
Author

gorgwu commented Apr 10, 2024

Having some issues with Tomcat 9. Will come back the week of the 24th-30th to finish debugging and dynamically compose the links.

@aaronbrethorst
Copy link
Member

sounds good!

@gorgwu
Copy link
Author

gorgwu commented Apr 30, 2024

Ran through the guide. Ended up staying with Tomcat 8, since I was having issues with 9. The new commands have the user download Tomcat 8 via an older Ubuntu repo.
Another notable change - for newer versions of MySQL Server, the user is no longer automatically prompted with setting a root password. The additional commands have the user set the root password manually.
I think everything else is more or less the same.

Now, I just need to dynamically compose the links.

@aaronbrethorst
Copy link
Member

@gorgwu hit me up on Slack if you need to talk through the dynamic composition.

@gorgwu
Copy link
Author

gorgwu commented Apr 30, 2024

I think I've successfully dynamically composed the oba version into the page. I looked at site_metadata.yml and then mimicked the line of code for dynamic composition that was used in downloads.erb. Let me know how it looks! Afterwards, I'll probably do one last commit to try and clean up the page and simplify any text.

image

@gorgwu gorgwu marked this pull request as ready for review May 1, 2024 04:50
@gorgwu gorgwu requested a review from aaronbrethorst May 1, 2024 04:57
@aaronbrethorst
Copy link
Member

Thanks, @gorgwu! I'll review this soon. Hopefully later today!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants