Gitea 推出 Actions

Hacker News 上看到 Gitea 出 1.19 的消息:「Gitea 1.19 (gitea.io)」,在討論裡面就有人提到 Gitea Actions,從名字就知道是抄自 GitHub Actions,算是 Gitea 開始建立自己的 DevOps 生態系的一個重要功能。

目前這個功能還被掛在 EXPERIMENTAL 上,預設是關閉的,而且我自己試了一下也的確試跑不太起來,出現這樣的錯誤訊息,暫時也沒空去細追:

time="2023-03-28T17:36:37Z" level=info msg="poller: request stage from remote server" func=pollTask
time="2023-03-28T17:36:37Z" level=error msg="cannot accept task" error="unknown: rpc error: code = Internal desc = pick task: CreateTaskForRunner: Error 1366 (HY000): Incorrect string value: '\\xF0\\x9F\\x8E\\x89 T...' for column 'name' at row 1" func=pollTask
time="2023-03-28T17:36:37Z" level=error msg="can't find the task: unknown: rpc error: code = Internal desc = pick task: CreateTaskForRunner: Error 1366 (HY000): Incorrect string value: '\\xF0\\x9F\\x8E\\x89 T...' for column 'name' at row 1" func=Poll

接下來會有更多人跳進去試,之後再來看看成熟度如何...

Perforce 買下 Puppet

Hacker News 首頁上看到的消息,Puppet 宣佈被 Perforce 買下,只是標題有點怪:「An Open Letter from the CEO of Puppet: Puppet and Perforce (puppet.com)」,原文連結在「An Open Letter from the CEO of Puppet: Puppet + Perforce」。

另外一邊 Perforce 的新聞稿標題比較正常,就是講 Perforce 買下 Puppet:「Perforce to Acquire DevOps Pioneer Puppet」。

在討論裡面也有人提到用「Open Letter」當公告很奇怪:

Not sure why this announcement was called an Open Letter?

Anyway,整體對 Puppet 算是好事... 吧?然後也有人提到這類工具看起來都是被併購:

話說現在用 Ansible 比較多,不過還是可以感覺到他的侷限性 (順便丟出來問看看好了),像是新機器上要裝 Let's Encrypt 的憑證,會遇到這樣的步驟:

  • 先設定 nginx/.well-known/ 指到對的路徑下。
  • 要 nginx reload。
  • dehydrated 或是 certbot 之類的軟體申請 test.example.com 的憑證。
  • test.example.com 的設定放到 /etc/nginx/sites-available/,然後加上 symbolic link 到 /etc/nginx/sites-enabled/ 裡。
  • 再 nginx reload 一次。

問題就在 nginx reload 要兩次這件事情,在 Ansible 裡面好像不太好做?看看有沒有什麼想法可以提供... (TwitterFacebook 或是 Plurk 上留言都可以)

Ansible 的爭論

前幾天在 Hacker News Daily 上看到「Five Ansible Techniques I Wish I’d Known Earlier」這篇,裡面提到了一些 Ansible 的用法還蠻有用的,算是開始用 Ansible 後應該都會有幫助的用法... 不過 Hacker News 上的討論「Ansible Techniques I Wish I’d Known Earlier (zwischenzugs.com)」比較精彩...

目前在頂端的留言對 Ansible 幹到不行,尤其是那個 YAML 格式:

Ansible is abysmal. I don't know why anyone still chooses it. It's a mess of yaml and what feels like a million yaml files that is always extremely hard to follow. Honestly writing some python, or bash is a lot easier to follow, read, and understand. The only thing it has going for it is the inventory system. I wish ansible would die already.

然後講到 bash 與 python 之類的工具時有人提到 idempotent:

>bash and python
Neither of those of idempotent.

馬上就有人幹勦,大多數人在寫 Ansible playbook 時根本沒人在注意 idempotent,而且一堆 shell script 的東西被塞進 YAML 只能說痛苦 XDDD

Most of the ansible roles I come across written by my team are not idempotent either, its a huge lie that Ansible is idempotent. Its idempotent if you put the effort into make it be but if I see tons of shell or command module invocations without prerequisite checks to see if the work should be done. Most devs I see using Ansible treat it like a shell script written in YAML and to that purpose it sucks.

我自己目前會挑 Ansible 主要還是因為 server 不需要另外裝軟體,是個 production 為導向的設計,再更大的時候就要想一下要怎麼繼續搞下去了...