vendredi 13 septembre 2019

Current status

Now that 2019 is almost behind us, it's time to do a retrospective and thoroughly attack the last few minutes. A Tope as we say in Colombia

For this year I had 3 objectives :
  1. Get certified in Cloud
  2. Do a bikepacking
  3. To code my product
Not all the objectives have been completed but I did some

1. I pass Google Cloud Architecture exam and I'm now certified.
2. I did not travel by bike, but I did Paris - ST Aignan ~ 230 km by bike and I made a short trip with the full package.

3. The code is still waiting. I started designing a product I wanted to create but found a similar product in the Google Store and lost confidence. Maybe I should continue.

But as 4. I found a new job and will begin a new adventure soon.

So finally things are even.





mardi 23 juillet 2019

Kubernetes, secret and ingress

Hello,

Theses days I spent a lof of times to setup ingress and TLS, to keep the commands needed :
To create TLS secret used by the ingress :
kubectl create secret tls secret-tls-name --key private.key --cert bundle.pem

To create bundle :
cat cer_file chain_file root_file > bundle.pem
If certificate are CER convert them to PEM first
openssl x509 -inform der -in certificate.cer -out certificate.pem

Then in ingress configuration specify in spec, the host, the backend, the tls file for the host :
spec:
  rules:
  - host: myapp.myhost.net
    http:
      paths:
      - backend:
          serviceName: myservice
          servicePort: 8080
        path: /
  tls:
  - hosts:
    - myapp.myhost.net
    secretName: secret-tls-name
You can multiple host and tls cert by host.

samedi 18 mai 2019

Schedule stop and start VM in Google Cloud

Hello,

First month I check the invoice and What !!!
Oups why to run the staging and support environment during non working hours ?
How to do it ?
Schedule I cron from Cloud Shell, maybe ?
But a more elegant way is to use Cloud Scheduler to create a cron job, to trigger Pub/Sub to execute a Cloud Function to stop/start the VM.
I need to check the cost 😀 but at least I learn something new.

Tutorial is straight forward
https://cloud.google.com/scheduler/docs/start-and-stop-compute-engine-instances-on-a-schedule

I simply changed the memory to the function to 128Mo.
Maybe there is a way to pass a list of VM, instead to create a cron job by VM and tutorial uses Node JS 6.x backlevel in April 2020, so a change of the code will be need, but nonetheless is works like a charm.

lundi 11 mars 2019

Migrate DNS to Google Cloud Platform

Just done it, super easy to migrate your DNS service to GCP.

From your account, I use Cloud shell session directly.

Replace silverston.fr and silverston by your domain

Create your new zone :
gcloud dns managed-zones create --dns-name="silverston.fr." --description="My awesome domain" "silverston" 

Import your zone
gcloud dns record-sets import -z=silverston --zone-file-format silverston.fr.txt --delete-all-existing 

--delete-all-existing is necessary to delete existing NS records and use Google instead.

Get your GCP NS servers :
gcloud dns managed-zones describe silverston


You will get your NS servers, for example :
nameServers: 
- ns-cloud-a1.googledomains.com.
- ns-cloud-a2.googledomains.com.
- ns-cloud-a3.googledomains.com.
- ns-cloud-a4.googledomains.com.


gcloud dns managed-zones describe examplezonename
Update your NS in your current registar to use googledomains (use the servers you get in the previous step)

And you're done.
Control DNS propagation using :

watch dig +short NS silverston.fr

source: https://cloud.google.com/dns/docs/migrating

samedi 23 février 2019

FTP to IBM System i

Sometimes you need still old school admin tricks, to upload files (WAS installation) to ISeries, the only native way, without to install SSH or other stuff is still FTP.
When it happens the easiest way is to use ftpclient.

ftp ipnode
login
password
change naming format because native DB format is limit 10 character long names
quote site namefmt 1
put
And you're done.

Previously you did create a new catalog and upload the files in this Catalog/directory.


vendredi 25 janvier 2019

Resolutions 2019

Hello,

I was thinking to the following resolutions since the beginning of 2019 but I rather to write them down because if I don't I will probably not complete, so I share them :
  • Get Chef first certification : Chef Fluency, maybe less important than 2-3y ago compared to Kubernetes but I did begin so I must complete.    
  • To get cloud certifications like AWS but most likely GCP because I use it more.
  • To do my first mobile app probably based on Strava.
  • To bike 12000km this year, including a backpacking weekend. I did 11000km in 2018.
  • To share theses experiences on the blog and more.

Thank you