dimanche 11 septembre 2022
Kubeflow on OCI
dimanche 19 juin 2022
Free Gitlab ARM on OCI
With Oracle Cloud Infrastructure article, you can deploy for free 2 VM ARM, for example your GitLab instance.
The article guides you through deploying your GitLab instance.
Here I provide you with the steps to update GitLab to the latest version and configure your instance to use a custom domain for free using DuckDNS, send emails and enable free SSL certificate with Let's Encrypt.
Upgrade GitLab
Upgrade following the GitLab upgrade path
https://docs.GitLab.com/ee/update/index.html#upgrade-paths
sudo yum -y update Gitlab-ee-13.12.15-ee.0.el8 sudo yum -y update Gitlab-ee-14.0.12-ee.0.el8
Finally, one last update
sudo yum -y update
Register your custom domain with DuckDNS
Create an account on www.duckdons.org.
Create your subdomain
Create your subdomain myinstance.duckdns.org using your OCI instance public IP.
Follow DuckDNS steps. Create /etc/duckdns/duck.sh
mkdir duckdns cd duckdns vi duck.sh
In the file add your custom DuckDNS configuration.
echo url="https://www.duckdns.org/update?domains=myinstance&token=a7c4b0ad-114e-40ef-ba1d-d218904a50f2&ip=" | curl -k -o ~/duckdns/duck.log -K -
Create your cron entry
*/5 * * * * ~/duckdns/duck.sh >/dev/null 2>&1
Update GitLab to use your custom domain
Update GitLab configuration file to update your external_url
sudo vim /etc/gitlab/gitlab.rb external_url 'http://GitLab.example.com'
Set your hostname
sudo hostnamectl set-hostname myinstance.duckdns.org
Reload configuration sudo GitLab-ctl reconfigure
Review configuration
sudo GitLab-ctl show-config
Configure GitLab to send email
Create OCI SMTP credentials
Follow the OCI steps to generate a username and password
https://docs.oracle.com/en-us/iaas/Content/Email/Reference/gettingstarted.htm https://docs.oracle.com/en-us/iaas/Content/Email/Tasks/generatesmtpcredentials.htm#Generate_SMTP_Credentials_for_a_User
Configuration GitLab to use Postfix
https://docs.oracle.com/en-us/iaas/Content/Email/Reference/postfix.htm
SMTP credentials to send emails
Edit GitLab configuration to use the credentials generated
sudo vim /etc/GitLab/GitLab.rb GitLab_rails['smtp_user_name'] = "ocid1.user.oc1..aaaaaaaaaxxxxx.ii@ocid1.tenancy.oc1...kd.com" GitLab_rails['smtp_password'] = "3e4rtyhu6yt_W"
Test to send email from GitLab
sudo GitLab-rails console Notify.test_email('my.email@domain.com', 'Message Subject', 'Message Body').deliver_now
https://docs.GitLab.com/omnibus/settings/smtp.html#testing-the-smtp-configuration
Tips and tricks
Send email in bash
sudo yum install mailx
The sender needs to be approved
https://docs.oracle.com/en-us/iaas/Content/Email/Reference/gettingstarted.htm#start__config
echo "This is a test message" | mail -s "Test" -r my.email@domain.com my.email@domain.com Check maillog sudo tail -f /var/log/maillog
SSL configuration
https://docs.GitLab.com/omnibus/settings/ssl.html#install-custom-public-certificates
In the following article, how to deploy your code
vendredi 1 avril 2022
Install Istio on OKE Oracle Linux 8.5
Tips, when installing Istio and the sample application Bookinfo on an OKE cluster running Oracle Linux 8.5 you may face the error
error Command error output: xtables parameter problem: iptables-restore: unable to initialize table 'nat'
You need to enable CNI support at the installation
istioctl manifest apply --set components.cni.enabled=true
On working nodes, you can apply the following commands as root and apply the configuration for restart.
modprobe br_netfilter ; modprobe nf_nat ; modprobe xt_REDIRECT ; modprobe xt_owner; modprobe iptable_nat; modprobe iptable_mangle; modprobe iptable_filter
cat <<EOF | sudo tee /etc/modules-load.d/99-istio-modules.conf
# These modules need to be loaded on boot so that Istio (as required by
# Kubeflow) runs properly.
#
# See also: https://github.com/istio/istio/issues/23009
br_netfilter
nf_nat
xt_REDIRECT
xt_owner
iptable_nat
iptable_mangle
iptable_filter
EOF
You will be able to deploy the application without troubles
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
details-v1-79f774bdb9-87x6d 2/2 Running 0 35m
productpage-v1-6b746f74dc-zg4tb 2/2 Running 0 35m
ratings-v1-b6994bb9-vtcqz 2/2 Running 0 35m
reviews-v1-545db77b95-fldn4 2/2 Running 0 35m
reviews-v2-7bf8c9648f-mj26p 2/2 Running 0 35m
reviews-v3-84779c7bbc-2jvjt 2/2 Running 0 35m
Documentation
https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengistio-intro-topic.htm
https://istio.io/latest/docs/setup/getting-started/
https://istio.io/latest/docs/examples/bookinfo/
Issue
https://github.com/istio/istio/issues/23009
mercredi 2 mars 2022
mardi 18 janvier 2022
GCP GKE VPN to on premises
Once we needed to consult an on-prem MS SQL from our PHP Lumen microservices.
Following the steps described in the following articles.
https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent
Then change to false to not mask links and publish them to the firewall.
masqLinkLocal: false