Reclaim Cloud: Accessing Databases

Previously on Reclaim Cloud Learning; I talked through working with SSL certificates on the Cloud and Mattermost training, and now I’m going to be talking about working through databases to round out the Reclaim Cloud month. This one, in particular, surrounds accessing databases (like WordPress, or Mattermost) without the confirmation emails from Jelastic. I’ll walk you through getting access to the database node from your Cloud Dashboard without your database credentials. Reclaim Hosting uses this method on our support, so we don’t have to reach back to the user to see if they’ve saved the credential emails. It helps us save time going back and forth and getting to the root of an issue quicker.

After you install an application to your environment, say through WordPress or Mattermost, you’ll receive a few confirmation emails with passwords to various portions of the site. You’ll want to save these credentials but delete the email. You can use this method as well to access your node through Reclaim Cloud.

Accessing the Database Node

First, however, the biggest step is to access the database node within your browser. You can access this a number of ways, first by going to the URL and using the specific port number. So for instance WordPress you can use env-3224720.us.reclaim.cloud:8443

You can also access it through a node if it is a separate instance within your environment like node9764-env-2948928.us.reclaim.cloud, you can use this when working with PostgreSQL too for Mattermost.

Once you’ve loaded the URL you should see a login screen:

Locating Credentials

If you don’t have the credentials that were sent via email after the Jelastic, you can also locate the credentials within the site’s configuration files.

You’ll want to navigate to the file management system within your Cloud Dashboard, but you can also use WebSSH if you’d like. This will walk you through the file management system.

WordPress

For WordPress, you’ll want to work through your wp-config.php file within /var/www/webroot/ROOT/wp-config.php

Connection settings should look like this:

// ** Database settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define( ‘DB_NAME’, ‘wp_7698727’ );

/** Database username */
define( ‘DB_USER’, ‘jelastic-6599005’ );

/** Database password */
define( ‘DB_PASSWORD’, ‘vsecurepassword’ );

/** Database hostname */
define( ‘DB_HOST’, ‘127.0.0.1’ );

/** Database charset to use in creating database tables. */
define( ‘DB_CHARSET’, ‘utf8’ );

/** The database collate type. Don’t change this if in doubt. */
define( ‘DB_COLLATE’, ” );

You’ll use the DB_USER and the DB_PASSWORD to access cPanel from there to access PHPMyAdmin.

Mattermost

Mattermost is just a bit different! Since this is using PostgreSQL, the location varies on the file. You’ll want to navigate to the /root/mattermost/congfig/config.jsonfile.

The username, password, and database name are located on the DataSource line under SqlSettings. Should look like:

“DataSource”: “postgres://webadmin:nky9FicDb4@sqldb:5432/mattermost?sslmode=disable\u0026connect_timeout=10”,

 

Once you’re logged in you’re good to go! You can make changes to the database like you would through the user interface, like changing a siteURL or homepageURL or grabbing an export of the database.


Featured Image: Photo by Henry Dick on Unsplash

Reclaim Cloud Training: Mattermost

One of my goals for 2022 is to spend some more focused time learning as much as I can on Reclaim Cloud. I’ve realized more (more now lately) that I am completely new to this mystical “Cloud” and all that’s possible with it. I initially took some training when we first started to get prepared on admin side of Reclaim Cloud where we can manage any user management and billing.

With the admin side training, I am very new to everything Cloud related. And with the Cloud, the possibilities are endless, which is super daunting. But I’ve been challenging myself to take some of the Reclaim Cloud tickets that come through support to tackle learning a bit at a time.

This first started when Jim was working on a Mattermost upgrade for a client. We’d been working on getting the container software up to the most recent version of Mattermost.

So Taylor, Jim and I jumped in a huddle in Slack (sidenote: this is the best feature in Slack by far, I’ve been using this a ton in the last couple of weeks) to look over getting the older version of Mattermost migrated to a new container without losing content. And after an hour and a half of talking and brainstorming, we made some headway!

I was in completely new territory. The core functions of Mattermost require MySQL or PostgreSQL as the database. This install was set up using PostgreSQL, which is not a database I’ve worked with until this point. We needed access to the database to export a copy as we migrate to the new clone. We first tried to run the commands to import/export from the WebSSH console, but quickly realized that we’ll need the username and password for the database in particular. The only problem, we didn’t have the username and password to access PostgreSQL.

The user is emailed the username and password when the Postgre database is set up on the environment but to eliminate some back and forth with the customer we decided to look through the config files to find the username and password. This is one feature cPanel does really well, adding an SSO aspect to PHPMyAdmin, that I’ve taken for granted. But I’ve used the config files to gain access to the databases for WordPress of Omeka migrations in the past, so I figured we could use the same method for Mattermost! There’s a config file somewhere right?

Looking through the Mattermost documentation, I was able to locate the configuration files necessary to grab the database user and password! Ah ha! Once we had that we could grab an export of the database within phpPgAdmin. After the export happened, it was smooth sailing from there, after a failed attempt to rsync from a docker container, we quickly realized we could SCP to a local machine and back to the final location.

Now for future Meredith to refer back to– some documentation we used during the migration:

I later had to jump off the huddle to work through the Support queue but I would say this was a massive success!! I found that this was by far the best Cloud learning experience I’ve had to date, and I’m super excited for more to come.

 

Featured image by C Dustin on Unsplash

Playing in the Cloud: Integrating Etherpad with Jitsi

One of the first things Tim showed me when we starting using Jitsi internally was the ability to integrate Etherpad Lite. I wanted to give it a try given I am working on demoing fully open source replacement for Zoom/Google Docs/Slack with Jitsi/Etherpad/Mattermost. I am now officially 2/3 of the way there 🙂

So, I already have both an Etherpad and Jitsi app running in Reclaim Cloud thanks to our handy-dandy one-click apps in the Cloud marketplace. After that Tim shared this guide in the Reclaim Hosting Community forums for integrating my Etherpad with Jitsi, and it worked a treat. When you click on the “Open shared document”…

… and voilà, now you have a blank Etherpad page that anyone on the call can edit directly from the Jitsi browser tab.

So, I added the KaraOERke instructions to the document which folks on the call can edit (though read-only is an option), it also has a link or an embed code.


You also have the option to import/export text and HTML files right from Jitsi. So, effectively full Etherpad functionality within Jitsi.

I really like the way this works, and through Jitsi you can also livestream to Youtube, I have not found other options yet, but given it is open source software I am sure they are not far off. I would love to be able to stream the Jitsi instance directly to ds106.tv.

The last piece of this open source remote teaching trifecta is Mattermost, I am going to dig in some more on that and see would integrating Etherpad and Jitsi into Mattermost looks like. But until then, you can always try this out for yourself using the 14-day free trial at Reclaim Cloud.

css.php