Learning About The Bitnami System Database

Database Code Lines

The Elusive Bitnami System Database

If you want to spin up a fast API solution, DreamFactory is a great way to do that with a Bitnami install. Within minutes you can have a fully documented and secure REST API to utilize. Just like any program bundle, there are lots of features to learn and interact with.  Outside of a Docker Swarm or AWS ELB setup, it is pretty hard to find a way to spin up a DreamFactory instance faster. We are going to dive in a bit further to find out how to interact with the system database.

NOTE: If you change the schema or a setting inside of this database, the system may become unstable and lose some or all functionality.  This is only recommended for advanced users.

One feature that is hidden within the Bitnami install is the ability to see the system database that is managing your DreamFactory instance.  In the image below, the MySQL DreamFactory instance system database is shown.
DreamFactory System Database
GitHub Clone DreamFactory System Database
Inside of a Bitnami instance, things are different.  If you select the MySQL database that ships with the instance you will not see a schema.  Fear not,  there is an easy solution!
Bitnami MySQL Database Schema
Bitnami MySQL Database Schema – NOT The System DB Though
Understanding that there would be no way for you to log into the instance without a system database, let alone be able to see anything in the Schema tab, means it must be somewhere.  But where? The system database is not picked up by default as a service in Bitnami.  If you are interacting with the DreamFactory admin interface in any way at all, you have a properly configured system database.

Where is the System Database, and How Do I Get There?

To interact with the system database in Bitnami, you just need to take a look at your .env file.  This file is located inside of the htdocs folder, which is inside of the install path (this can be seen on the config tab). The system database credentials will be in the Database Settings section. Bitnami names the system database by default something similar to bitnami_dreamfactory or bn_dreamfactory. You will notice that you can access the system database endpoints regardless of not being able to change the schema in the Schema tab.  If you migrate to one of the system endpoints in the API docs tab, the info will still be returned as normal.  Below is an example of the GET /system/environment endpoint in my local Bitnami instance:
Insomnia Bitnami System Environment
Insomnia Bitnami System Environment Endpoint
Under the Services tab, you can create a new MySQL database service and use the credentials from your .env file to add the system database to your API Docs and Schema tabs, so that you can interact with them. With the discovery of the system database available you can now see full Swagger documentation.  Furthermore, you can interact with the endpoints as normal. For example, you can use the endpoint GET /_schema to see the schema as shown below.
Bitnami MySQL System Database Schema Call
Bitnami MySQL System Database Schema Call
From there you can run amok in the system database.  Again, one last warning, please realize that if you are not careful, you might CRUD your way into a non-functioning system.  The bright side to that as we said up top…you can just spin up another and that my friends, is the beauty of Bitnami.

The Rise of the Front-End Developer Part II

BenBusseWhat is the DreamFactory Services Platform? In a nutshell it’s a pre-built, open source back-end that you can install on any cloud infrastructure (AWS, Azure, RackSpace, etc.) or in your own data center. Released under the Apache license, the DSP is designed with the power, security, and flexibility to deploy a world-class mobile application. It includes a palette of secure services that you can access with REST (or SOAP) to fetch and return JSON (or XML) documents to your client app. You get a fully dedicated SQL database, standard BLOB storage, an external services interface, and highly configurable user management functions. The DSP works with everything from lightweight CRUD applications to the most sophisticated enterprise mobile apps. And you still get to use your client-side technologies of choice — whether HTML5 in the browser, hybrid, or native, it’s all good. There’s no need to master a brand new language or framework. It’s a great time to be a front-end developer. And we’re super excited to be a part of a new wave of mobile technologies that enable front-end developers to build amazing apps without relying on a “roll your own” back-end approach. If this sounds interesting, take the DSP for a spin by signing up for a free trial. After you sign up, check out our screencast tutorials, REST API, and developer documentation. You can also import some sample apps on our GitHub page to start learning how it all works. Let us know what you think by posting on the DreamFactory website forums, message us on Twitter, or reach out to our support team. We’re here to help! And stay tuned for future blog posts and screencasts that will dive into a lot more technical detail about how to build great mobile apps with the Dreamfactory Services Platform. Happy coding!