Skip to content

Instantly share code, notes, and snippets.

@arif-m150
arif-m150 / install_pyenv_mac_zsh.rst
Last active December 26, 2022 02:05 — forked from josemarimanio/install_pyenv_mac_zsh.rst
Installing pyenv on macOS for Zsh using Homebrew

sudo apt install pgbouncer

Edit the pgbouncer configuration file /etc/pgbouncer/pgbouncer.ini

  * = host=localhost port=5432
  Set the listen_port = 5432 and listen_address = * 
  Set the auth_type = md5. 

Run below query in psql

A. Infrastructure

FQDN IP Purpose 1 Purpose 2
IT-RDBMS01.itenlight.com 10.1.10.150 Primary PostgreSQL instance Active pgpool-II instance
IT-RDBMS02.itenlight.com 10.1.10.155 Standby PostgreSQL instance Standby pgpool-II instance

Virtual IP that will be used is 10.1.10.159.

@arif-m150
arif-m150 / Github CICD.md
Created May 20, 2022 03:29 — forked from akhdaniel/Github CICD.md
Github CI/CD Setup

Overview

How to create a pipeline which checks your app's code quality -frequently, automatically, in the cloud - using GitHub Actions. Such as to lint, test and build your app hosted on GitHub.

Objectives

  • How to make a basic deploy pipeline for your code can setup quick, easily and for free.
  • It can run in the cloud whenever someone pushes to your repo. It will warn you when something fails. So in case you forgot to run tests locally or you edited in GitHub UI, you're covered.
  • GitHub supports a pipeline service called GitHub Actions, covered in this post.

Odoo Webservice API Context

Pada pembuatan aplikasi mobile yang terkoneksi ke Odoo dengan JSONRPC/XMLRPC seringkali kita perlu mendapatkan informasi stock dan harga per lokasi gudang atau harga barang per company jika Odoo nya sudah dibuat multi-company.

Artikel ini membahas bagaimana secara API jsonrpc/xmlrpc kita bisa untuk:

  • mendapatkan data quantity produk sesuai gudang, lokasi, atau company
  • mendapatkan harga produk sesuai price list

Create cluster

gcloud container clusters create "gke-px" \
--zone "asia-southeast1-a" \
--cluster-version "1.20.8-gke.900" \
--machine-type "n1-standard-4" \
--image-type "UBUNTU" \
--disk-type "pd-ssd" \
--disk-size "100" \

Objectives

  • Set up two Compute Engine instances running Postgres.
  • Create a new table for a guestbook app.
  • Configure the primary server.
  • Back up the primary server to the standby server.
  • Configure the standby server to run in Hot Standby mode.
  • Start the standby server and test it.

Creating the guestbook table on Primary Server

PostgreSQL High Availibility on Kubernetes

  • Installation
  • Create PostgreSQL Cluster
  • Connect to a PostgreSQL Cluster
    • psql
    • pgAdmin
  • Updating PostgreSQL Cluster
  • High Availability
[options]
#
# WARNING:
# If you use the Odoo Database utility to change the master password be aware
# that the formatting of this file WILL be LOST! A copy of this file named
# /etc/odoo/openerp-server.conf.template has been made in case this happens
# Note that the copy does not have any first boot changes
#-----------------------------------------------------------------------------
# Odoo Server Config File - TurnKey Linux