Starting with installing Docker on EC2 and running Yellowfin in a container

image.png

First of all

It seems that Yellowfin can now be run on Docker and Kubernetes, probably because containerization of apps is popular, so I would like to write an article from nothing to running on Docker. With this, I am grateful that even short-term POC (All-in-one package), sandbox, and medium- to long-term POC (App-only-image) can be done immediately. The docker file etc. are prepared here. https://github.com/YellowfinBI/Docker https://hub.docker.com/u/yellowfinbi

And here, we will explain assuming that it will be started on AWS EC2.

Advance preparation

Set up the server before installing docker. Roughly speaking, first update the language settings and time zone settings to match those of Japan so that you can see the server resources with dstat.

sudo yum update
sudo localectl set-locale LANG=ja_JP.UTF-8
sudo timedatectl set-timezone Asia/Tokyo
sudo yum install dstat

install docker

Install docker with yum and set service start and service automatic start when the server starts. The usermod on the 4th line seems to be able to execute the docker command without sudo when the user is added to the docker group, so add it. After rebooting, check the version as a user and test if you can hit the command safely.

sudo yum install docker
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -aG docker $USER
sudo reboot //Reboot to apply
docker --version

This completes the installation of docker itself.

Install docker-compose

docker-compose allows you to write multiple container definitions in a yml file, including options for Docker build and container startup, and use it to build Docker and start containers. You will be able to manage multiple containers with one simple command. The Yellowfin settings are also written in a yml file, so install this.

Remember the latest version of docker-compose at ↓. https://github.com/docker/compose/releases When typing with a command, replace the 1.27.4 part with the confirmed version. Execution permission is given on the second line.

sudo curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version

Run Yellowfin on Docker

Start Yellowfin from here in two patterns. The first pattern, All-in-one package, includes Yellowfin including postgreSQL, so if you just want to give it a try, this is fine. However, since I live with the DB, all the data will be lost the moment the service is dropped. .. The second pattern, App-only-image, is a method of creating a Yellowfin repository externally and containerizing only Yellowfin apps. Therefore, even if this service is dropped, the data is stored in the DB, so if you raise the service again, you can continue working again. You just need to be careful that you have to match the version of the application and the repository DB. In case of Yellowfin 9.3.1, the repository DB must also have the configuration of 9.3.1.

Run Yellowfin with All-in-one package

Get the image with this command.

docker pull yellowfinbi/yellowfin-all-in-one:latest

https://github.com/YellowfinBI/Docker/blob/master/Docker%20Files/yellowfinAllInOne/Dockerfile Download the configuration file from here and save it as docker-compose.yml. Type the following command in the saved directory to start it.

[ec2-user@ip-172-31-4-99 all-in-one]$ docker-compose up -d
Creating all-in-one_yellowfin-all-in-one_1 ... done

Then visit xxx.xxx.xxx.xxx:8080 to open the Yellowfin login page.

Run Yellowfin with App-only-image

This method requires a repository DB created / updated in advance with the version to be moved. Therefore, in order to create from scratch, it is necessary to first install the full version of Yellowfin, create a repository DB, and complete the initial startup. If you want to create from scratch, please see here. Notes on building the best Yellowfin test environment on EC2

Now for the steps, first copy the link from https://portal.yellowfinbi.com/yf_latestbuild.jsp and download the full version of the latest build.

wget https://files.yellowfin.bi/downloads/9.3/yellowfin-9.3.1-20201022-full.jar

Then change this file name so that it can be read by yml.

mv yellowfin-9.3.1-20201022-full.jar yellowfin-installer.jar

Download Dockerfile and perform_docker_configuration.sh from here to the same directory. https://github.com/YellowfinBI/Docker/tree/master/Docker%20Files/yellowfinAppOnly

Grant execute permission to the shell file.

sudo chmod 764 perform_docker_configuration.sh

Create an image.

docker build . -t yellowfin-app-only

Then, the Dockerfile is read and the command is executed. image.png

Rewrite the repository information and execute the command.

sudo docker run -d -p 80:8080 \
-e JDBC_CLASS_NAME=org.postgresql.Driver \
-e JDBC_CONN_URL=jdbc:postgresql://dbhost:5432/yellowfinDatabase \
-e JDBC_CONN_USER=dbuser \
-e JDBC_CONN_PASS=dbpassword \
yellowfin-app-only:latest

In this case, we are routing to port 80, so accessing xxx.xxx.xxx.xxx will bring up the Yellowfin login page. Click here for the state of the container at this time. You can see that the All-in-one package is dropped and only the App-only-image container is up. image.png

Useful commands

//Image download
docker pull [option]Image name[:Tag name]
//List of Docker images in the local environment
docker images
//Container background execution
docker run -d image name[:Tag name] [argument]
//Show all containers
docker ps -a
//Start container
docker start container ID
//Stop container
docker stop container ID
//Delete container
docker rm container ID

So

As soon as you build this, you can create a sandbox, or it will be launched as a service separate from the DB, so you can create an environment that feels more comfortable. It was difficult to command if I wasn't used to it, but I feel like I've come to understand it while using it. For the official documentation, please contact Yellowfin Japan for a white paper. I would like to challenge clustering with Docker and building with Kubernetes when I have some time.

I was allowed to reference.

Installing docker and docker-compose (Linux) Introduction to Docker (6th) ~ Docker Compose ~ Docker command list

Recommended Posts

Starting with installing Docker on EC2 and running Yellowfin in a container
I tried running Ansible on a Docker container
[Note] Build a Python3 environment with Docker in EC2
A memorandum when installing Docker and building a Linux container
Create a Java (Gradle) project with VS Code and develop it on a Docker container
[Docker] How to update using a container on Heroku and how to deal with Migrate Error
Create a Java (Maven) project with VS Code and develop it on a Docker container
I tried running a Docker container on AWS IoT Greengrass 2.0
Run React on a Docker container
Run PureScript on a Docker container
With podman in docker, everyone wants to get along and use docker on a shared computer
Workspace setting location when connecting remotely with VS Code and working on a Docker container
I tried deploying a Docker container on Lambda with Serverless Framework
Launch docker container on EC2 (personal memorandum)
Scraping with puppeteer in Nuxt on Docker.
Directly operate mariadb running in Docker container
Put Zabbix in Ubuntu with Docker and monitor Docker on the same host
How to start a Docker container with a volume mounted in a batch file
Try running MPLS-VPN with FR Routing on Docker
Building an environment for WordPress, MySQL and phpMyAdmin with Docker Compose on EC2
[Docker] Check the running container and enter there
Keep docker container running with no resident process running
Create a Docker container for your development web server in Ansible on MacOS
Try running OSPF with FR Routing on Docker
I installed Docker on EC2 and started it
Monitor the Docker container and SystemD process on the same host with Zabbix on Ubuntu.
Update container image with KUSANAGI Runs on Docker
Prepare a scraping environment with Docker and Java
I tried installing docker on an EC2 instance
[Part 1] Creating a Docker container that delivers Markdown in HTML with Apache / Pandoc
Create a container image for arm64 of Kibana and register it in GitHub Container Registry. Start Elastic Stack with Docker Compose on Raspberry Pi 4 (64bit)
How to build a Jenkins server with a Docker container on CentOS 7 of VirtualBox and access the Jenkins server from a local PC
Install Ubuntu 20.04 in virtual box on windows10 and build a development environment using docker
Proceed with the official Rust documentation on a Docker container (2. Program a number guessing game)
Access and debug Circle CI Docker container with ssh
[Docker] Build an Apache container on EC2 using dockerfile
The story of pushing a Docker container to GitHub Package Registry and Docker Hub with GitHub Actions
How to develop in a container with --privileged and / sbin / init passed in VSCode Remote Containers
Proceed with Rust official documentation on Docker container (1. Getting started)
Copy and paste the file contents in Ubuntu's Docker container
[Docker] Build a site on Hugo and publish it on GitHub
Run PHP-FPM with OPcache enabled in a Read Only container
Install docker and docker-compose on ubuntu in the shortest process
[Docker] Delete only the volume associated with a specific container
Build a Node-RED environment with Docker to move and understand
Time is wrong with the application launched on the Docker container
Try Hello World using plain Java on a Docker container
I tried running WordPress with docker preview on M1 Mac.
Write DiscordBot to Spreadsheets Write in Ruby and run with Docker
Easily convert Java application to Docker container with Jib ~ Build with gradle and register in local repository
Organize communication in an environment that uses various resources on the host machine and Docker container
With [AWS] CodeStar, you can build a Spring (Java) project running on Lambda in just 3 minutes! !!
Deploy with EC2 / Docker / Laravel
Spring Boot starting with Docker
Install docker on AWS EC2
Installing and building Docker (memo)
Build Metabase with Docker on Lightsail and make it https with nginx
Summary of steps for developing in Docker container with VS Code
Prepare a transcendentally simple PHP & Apache environment on Mac with Docker
Create a flyway jar with maven and docker build (migrate) with docker-maven-plugin
(Ruby on Rails6) Creating a database and displaying it in a view