Quokka CMS is a Flask-powered, flexible Python CMS with a number of different themes available to suit anyone’s taste. It is easy to use and can be extended with a vast variety of useful modules. Also, this content management system provides a number of additional features you can benefit on, such as: customizable administrator interface, channel-based organization of content, role-based access control, etc.
In this instruction, we will find out how you can deploy and run your own Quokka CMS instance with the help of MongoDB and Flask – micro-framework, which is commonly used for developing simple applications on the base of number of available templates. So, follow the detailed guidance below to accomplish this:
To start with, let’s prepare a separate environment for our project by following the next instructions:
1. Press the New Environment button at the top pane of the dashboard.
2. In the opened topology wizard, navigate to the Python programming language tab. Here, the Apache application server will be chosen automatically as the only available one, so just add the MongoDB node within the NoSQL database section.Specify cloudlet limits for the chosen nodes, select the region, enter the desired environment name (e.g. quokka), and click Create.
3. Your environment will appear at the dashboard in a minute.
Now it’s time to create a new dedicated database, where all of the Quokka CMS data will be stored.
1. Press the Open in browser button next to the MongoDB node.
2. Within the opened page, log in to the MongoDB administration panel with credentials you’ve received via email after the environment creation.
3. Once authorized, move to the Databases section by clicking the appropriate button at the top pane. Locate the Create Database section inside and specify the name for a new database within it (e.g quokka).
Press Save when ready.
4. In a moment your new database will appear at the list, so you can move on and switch to the Execute panel tab. Here, you need to create an admin user for the DB by executing the corresponding piece of code:
db.createUser({user:"{name}", pwd:"{password}", roles:[{role:"readWrite", db:"{db_name}"}]})
where
Note: The admin username refers to the default MongoDB user, so, obviously, you can’t use it as a name for your user.
Select your database within the drop down list and click the Execute button below to finish the DB configuration.
After all the preparations are done, you can proceed directly to the Quokka CMS building and deploying to the CirrusGrid platform.
1. Access your Apache application server via the CirrusGrid SSH Gateway.
virtualenv virtenv source virtenv/bin/activate
3. Now, you should remove the default pre-installed application and deploy Quokka CMS app using the GIT repository as a source:
rm -rf ROOT; git clone https://github.com/pythonhub/quokka.git ROOT
4. Navigate to the ROOT folder with application files you’ve just downloaded and install the required Python modules (they are already listed within the requirements.txt file):
cd ROOT pip install -r requirements/requirements.txt
5. Next, let’s specify the database connection data. Execute the vim quokka/settings.py command to open the appropriate configuration file, where you need to find the following strings and replace the default values with your own ones:
MONGODB_DB = {db_name} MONGODB_HOST = '{db_ip}' MONGODB_PORT = 27017 MONGODB_USERNAME = "{name}" MONGODB_PASSWORD = "{password}"
where:
In order to save the changes and exit from the vim editor, use the :wq command.
6. Then, enter the vim wsgi.py command and specify the application entry point for mod_wsgi module by replacing the default content of the opened file with the following lines:
#!/usr/bin/python import os,sys virtenv = os.path.expanduser('~') + '/virtenv/' virtualenv = os.path.join(virtenv, 'bin/activate_this.py') try: exec(open(virtualenv).read(), dict(__file__=virtualenv)) except IOError: pass sys.path.append(os.path.expanduser('~')) sys.path.append(os.path.expanduser('~') + '/ROOT/') from werkzeug.serving import run_simple from werkzeug.wsgi import DispatcherMiddleware from quokka import create_app, create_api application = DispatcherMiddleware(create_app(), { '/api': create_api() }) if __name__ == "__main__": run_simple( '0.0.0.0', 5000, application, use_reloader=True, use_debugger=True )
Save the changes you’ve made and exit the editor.
7. At last, let’s add a symlink for binding server’s entry point to the just modified file:
ln -s ~/ROOT/wsgi.py ~/ROOT/application
8. That’s all! Now you can return to the dashboard and press the Open in browser button next to your environment to launch your Quokka CMS.
Tip: Take into consideration that applications, which were deployed via SSH, are not displayed at the CirrusGrid dashboards' Deployed column.
As a result, you will see the application’s welcome page with the automatically generated admin credentials stated, so you can instantly log in and start exploring.
Enjoy working with your own Quokka CMS application, hosted at CirrusGrid Cloud!
If you experience any difficulties while configuring or deploying Quokka CMS, you can appeal for our technical experts' assistance at Stackoverflow.
Powered by BetterDocs
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.