Ship readymade dashboards in kibana docker image and rpm - kibana

I have a twofold question:
How to ship in built reports and dashboards in kibana docker image and rpm ?
My requirement is that when any user installs kibana using a docker image or rpm and starts running it in browser, he/she sees some already made dashboards in it before creating anyone themselves.
How can I ship ready-made dashboards with the docker image or rpm?

The reports/dashboards are stored in Elastic Search itself.
See ->
Location of custom Kibana dashboards in ElasticSearch
If there is single instance of ES, then that will shared by different users.

Related

Accessing Shiny App from the WordPress site

I have a shiny dashboard, which I have deployed on my custom server (running CentOS). It is deployed by running the following command on the terminal -
> cd "path_to_shiny_app"
> R -e "shiny::runApp(port=XXXX, host = getOption('shiny.host', 'xxx.xx.xx.xxx'))"
On the same server, I also have a WordPress website running. Both Shiny Dashboard and WordPress site will keep running 24x7.
Question 1 - Is there a way I can place a link to Shiny Dashboard on the WordPress site so that my website users can Shiny App through that link?
Question 2 - Is there a limit to the number of users accessing this shiny dashboard in this way?
I am sure someone must have solved it earlier and can help.
Yes, but you need to do more things before generating the link.
Using shiny::runApp directly is not recommended. You want to use a shiny server instead. Depending on the version (free, paid) you use, user counts, load balancing and other settings can be modified accordingly. I personally recommend to use shiny docker instead of installing by yourself.
Once your Shiny apps are running in a localhost port by the shiny server, In order to have it visible for people outside your local network, you need to use a reverse proxy service like nginx or apache to "export" to ports.
Setup your server firewall configs so reverse proxy service can pass the firewall.
Optional, go to your domain manager, create a subdomain for shiny apps.
Additional detailed readings: https://deanattali.com/2015/05/09/setup-rstudio-shiny-server-digital-ocean/
Back to your question
Q1, once you have done above, you should have the Shiny app link, and you can use it on your WordPress.
Q2, there is no user limit, it depends on how powerful your server is. Too many people using the server at the same time may crash it. Paid version of Shiny server has load balancing settings, not sure about the free version.

How to keep persistent volumes in sync between clusters?

I'm trying to get an installation of Wordpress running in Kubernetes, as well as have an option of running the same configuration locally in minikube. I want to use the standard Docker image of Wordpress: https://hub.docker.com/_/wordpress/.
I'm having trouble with making sure that the plugins and templates are in sync though. The Docker container exposes a Volume at /var/www/html. Wordpress installation, as well as my plugins will live there.
Assuming I do the development on Minikube, along with the installation of plugins etc. How do handle the move between Persistent Volumes between my local cluster and the target cluster? Should I just reinstall Wordpress every time when the Pod is scaled?
You can follow Writing Portable Configuration (https://kubernetes.io/docs/concepts/storage/persistent-volumes/#writing-portable-configuration) guide for persistent volume if you are planning to migrate it to different cluster.
In a real production scenario you would want to use a standard tool to backup and migrate persistent volumes between clusters. Valero is such a tool which enables you to achieve that.

openstack : how to build a custom image from a VM

I have a Virtual machine that I have customized with all the packages I need and it runs using virt-manager. I logged in and created a few directories and scripts in that image. I would like to "snapshot" it and run the snapshot on openstack. I don't care if the runtime state is preserved. All I want is for the packages and custom code that I have created on the virtual machine to be there.
I tried various things with the qcow2 image that virt-manager uses but that did not work. I don't quite understand - where are the changes I made to the file system?
I would like to generate an image with my customizations that I can subsequently run on an openstack cloud.
How can I proceed?
Thanks
Ranga

Do I need a VM instance for each WordPress instance on Google Cloud?

I've been playing with Google Cloud, trying to figure out the most cost-effective way to host multiple low-traffic WordPress websites.
With Bitnami, it seems to me that for every new WordPress instance, I'm having to provision a new virtual machine. I also tried Google click-to-deploy WordPress setup, and it forced me to provision a cluster with 3 VM's.
Each of the new VM's cost money, so I'm wondering if there's a way to do something similar to shared Linux hosting, where I could host multiple WordPress instances on a single Virtual Machine.
You can use the Bitnami Wordpress multisite stack, which allows multiple sites to run on one server.
In you don't want to use the Bitnami Multisite solution, you can also install multiple WordPress apps in the same server without installing multiple database or web servers. Bitnami provides modules to install on top of an installed stack (normally LAMP stack) and the WordPress module allows you set the name of the blog you want to create.
The module can be downloaded from here but you will need to run the following commands in the instance (these commands will download the current version)
wget https://bitnami.com/redirect/to/269995/bitnami-wordpress-4.9.8-0-module-linux-x64-installer.run
chmod a+x bitnami-wordpress-4.9.8-0-module-linux-x64-installer.run
sudo ./bitnami-wordpress-VERSION-module-linux-x64-installer.run --wordpress_instance_name NEW_BLOG_NAME
Once you have the module installed, you will be able to access it through http://localhost/NEW_BLOG_NAME.
More info in the Bitnami documentation
https://docs.bitnami.com/installer/apps/wordpress/configuration/install-several-wordpress-modules/
I found the following post which has explains how it might be done.
http://designhack.slashlab.net/en/how-to-setup-multiple-wordpress-without-multisite-ft-bitnami/
Make sure to back up important data before you start.
There is the chance to set up multiple websites using bitnami, but i recommend to kept separate every site to avoid database confusion, and to extend the functionalities of every website.
https://bitnami.com/stack/wordpress-multisite
Im using a single VM per domain to avoid confusion with DNS.

Best way to install web applications (e.g. Jira) on Unixes?

Can you throw some points on how it is a best way, best practice
to install web application on Unixes?
Like:
where to place app and its bases and so for,
how to configure to be secure and easy to backup,
etc
For example I know such suggestion -- to set uniq user for each app.
App in question is Jira on FreeBSD, but more general suggestions are also welcomed.
Here's what I did for my JIRA install on Fedora Linux:
Create a separate user to run JIRA
Install JIRA under the JIRA user's home directory
Made a soft link "/home/jira/jira" pointing to the JIRA installation directory (the directory as installed contains the version number, something like /home/jira/atlassian-jira-enterprise-4.0-standalone)
Created an /etc/init.d script to run JIRA as a service, and added it to chkconfig so that it runs at system startup - see these instructions
Created a MySQL database for JIRA on a separate data volume
Set up scheduled XML backups via the JIRA admin interface
Set up a remote backup script to dump the MySQL database and copy the DB dump and XML backups to a separate backup server
In order to avoid having to open extra firewall ports, set up an Apache virtual host "jira.myhost.com" and used mod_proxy to forward requests to the JIRA URL.
I set everything up on a virtual machine (an Amazon EC2 instance in my case) and cloned the machine image so that I can easily restart a new instance if the current one goes down.

Resources