Sunday, January 14, 2018

Docker issue


1. I had experience once in a blue moon and there's nothing way than to stop/start the docker service. Viola!

Issue:
Error response from daemon: cannot stop container: odoo9: Cannot kill container 0a08b9aefcaa2db053330cbd2b80591a81e68e4027cf6183338fc2700dd940bb: connection error: desc = "transport: dial unix /var/run/docker/containerd/docker-containerd.sock: connect: connection refused": unknown



solution:
sudo /etc/init.d/docker stop
sudo /etc/init.d/docker start





2. When I tried to run latest odoo11 and postgres 10 using docker-compose , I knew I perfectly copied from my configuration in odoo 9 setup but when I hit enter. Bang! issue found.
After a few googling for answers, I think there's some problem with volume. I guess. :)

Issue:

psycopg2.OperationalError: FATAL:  password authentication failed for user "odoo"


Solution:
docker volume rm malphi_malphi_odoo-db-data

Reference:
https://stackoverflow.com/questions/29580798/docker-compose-environment-variables




3. When I installed a new fresh centos environment in vbox. Everything is new, even docker :)
I have this issue everytime I open the virtual box that docker is not running.


Solution:
sudo systemctl start docker
sudo systemctl enable docker

Reference:
https://docs.docker.com/install/linux/linux-postinstall//

Friday, January 12, 2018

Print output does not reflecting in the log

It took me a couple of days just to figure out this problem. I know its a simple as you think but I'm wondering why can't show the print output in the log.

For many test attempt that I have done, I finally figure it out.

Simple.

environment:
      - PYTHONUNBUFFERED=1

that's it, just add this to docker-compose yml file.
Eureka!

Sunday, January 7, 2018

We will talk about NGINX

I have heard this NGINX a long time ago when I got here in my recent job but I don't know what exactly it is. I had a little knowledge that it will manage the proxy and that's it.

When I deployed docker in our SIT environment (my boss give me the opportunity to use my skill in docker). I heard again NGINX in our discussion and I asked this question. "What is exactly is NGINX?" my boss replied. "Boy, it's a good time to learn something new" and so he explains.

We end up with docker deployed in SIT and installed Odoo environment as well but no NGINX.

Today, I learn this technology by watching youtube.

This link from Quentin Stafford-Fraser who explains very clearly about NGINX

Saturday, January 6, 2018

Wednesday, January 3, 2018

Linux command that you don't know first


1. Linux command to print directory structure in the form of a tree

ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'



2. Change folder ownership

chmod -R 777 directory_name



3. Make it runnable

sudo chmod +x filename.bin


4. Renew IP address
sudo dhclient -r

Monday, January 1, 2018

Change the file permissions to be server-writable?

Linux
Once you have the files set up on your Linux box, and assuming you can SSH into the box to access your SimplePie files:

Navigate to the directory above your cache directory.
Type chmod -Rf 755 ./cache.
If that doesn't work, try 775, then 777 in order until you find one that works.

How to connect shared folder in virtual box using centos


sudo mount -t vboxsf repo2 /home/devlynard/data/vbroker

sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

sudo yum install docker-ce
yum list docker-ce --showduplicates | sort -r

docker-ce.x86_64            17.12.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.09.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.09.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.06.2.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.06.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.06.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.03.2.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.03.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.03.0.ce-1.el7.centos             docker-ce-stable

sudo yum install docker-ce-17.09.1.ce

sudo systemctl start docker
sudo usermod -aG docker $USER

https://www.youtube.com/watch?v=EYVO4kEQomE
https://www.if-not-true-then-false.com/2010/install-virtualbox-guest-additions-on-fedora-centos-red-hat-rhel/




UPDATED: 9 Jan 2018

I have successfully connected my working directory from host(Windows) to server(virtualbox running centos)

1. add shared folder in virtual box settings.

2. mount below folders
sudo mount -t vboxsf repo2 /home/devlynard/odoo9/app/customaddons

3. add command at start up
edit etc/rc.d/rc.local
make it executable

Eureka!




free online comma separating tool

https://delim.co/#