自從用過AWS的EC2和RDS以後,就難避免也要學會一些GCP的技術,有了AWS基礎後,頭一次用GCP的難度也就沒有那麼高了,不過在一些細節的地方還是有所不同,很多東西用起來可能還不是很習慣,但摸索之後很快還是能理解,這篇就作一些首次建置Compute Engine和Cloud SQL的筆記,下一篇有空再作其他進階功能。
2024年9月29日 星期日
2024年9月10日 星期二
【IT Notes】RHCE測驗第十六題 Rekey an Ansible vault
Rekey an existing Ansible vault as follows:
Download the Ansible vault from http://example.classroom.com/cd/exam_rhce8/salaries.yml to /home/student/ansible
The current vault password is retent
The new vault password is redhat
The vault remains in an encrypted state with the new password
【題前說明】
又是一個可以喘口氣的題目,此題只是要考對ansible-vault指令是否熟悉,只需要去data主機把要求的路徑檔案先下載好,然後重新配置檔案的密碼,沒有太多困難的操作,跟上一題比輕鬆很多。
2024年9月5日 星期四
【IT Notes】RHCE測驗第十五題 Create user accounts
Download a list of users to be created from http://example.classroom.com/cd/materials/user_list.yml and save it to /home/student/ansible
Using the password vault /home/student/ansible/locker.yml created elsewhere in this exam, create a playbook called /home/student/ansible/users.yml that creates user accounts as follows:
Users with a job description of developer should be:
- created on managed nodes in the dev and test host groups
- assigned the password from the pw_developer variable
- a member of supplementary group devops
Users with a job description of manager should be:
- created on managed nodes in the prod host group
- assigned the password from the pw_manager variable
- a member of supplementary group opsmgr
Passwords should use the SHA512 hash format.
Your playbook should work using the vault password file /home/student/ansible/secret.txt created elsewhere in this exam.
【題前說明】
這也是一個有相當難度的考題,運用到相當多的迴圈與變數的概念,首先要透過data主機提供的使用者訊資訊yml,內容有user的UID、名稱、群組和密碼變數,再來套用在上一題所創建的加密檔案,內容有變數所需要的帳號和密碼,最後會依照各node所屬群組,分批次方式部署各node索要建立的群組與使用者。難度在於要清楚地分辨哪些node要建立哪些使用者與群組。依據題目內容再解說更詳細一點,這題先要在dev和test的node上,建立devops群組,然後建立屬於devops的使用者與密碼;再於prod的node上,建立opsmgr群組,然後建立屬於opsmgr的使用者與密碼。這些user的密碼皆使用SHA512的加密方式。
2024年9月3日 星期二
【IT Notes】AWS建立IAM user
記得剛開始上AWS課程時,就被教育要盡量避免用root來操作,為了安全起見,root的最大權限應該少被拿來用在系統的建置等,而且用來監控帳單和成本用,雖然實際上還是很多人用root作業,不過還是盡量養成習慣,想要用管理員權限的話,通常還是建議透過IAM使用者來做事,而且其實很多服務都有跟IAM作關連,所以學習一下IAM還是很重要的。
這次情境就是遇到用戶想分開管理權限,root使用者帳號他要收回去自己使用,於是就得另外先建立屬於我們自己的IAM管理員帳號。
【少年回憶】尋夢谷
「尋夢谷」這個地名,在我人生中是一個很深刻的存在。那大約是國中二年級的事情了吧,距離現在快要三十年了。後來重新找到這個地方的時候,這裡只剩下大門和一處房舍,尤其是後者,讓我一看到馬上就能辨識出來;至於剩下的其他地方,如今只剩下一片荒煙蔓草、汽車駕訓班和工寮。 為什麼此處留有我那...
-
上次把八里連的經歷寫完花了不少時間,主要原因是,回憶中很多細節容易以片段方式想起來,時間愈遠就愈會遺漏,通常都是突然想起就再補充進去。扣掉八里的經歷,當兵其他大部分時間都在龍陵營區度過(這名字聽起來有點陰),這是在桃園龍岡的 21 砲兵指揮部,營區就在龍岡圓環附近而已。當時抽籤...
-
在我心目中,《新兵日記》是天花板等級的軍教片。並不是說沒有比它更好的作品,只是因為它拍攝的場景與時間點,正是我在服兵役的時候。老婆很多次好奇問我,為什麼我總是放著 YouTube 的《新兵日記》直播?我都說我只是放著當背景聲音,沒有真正在看。但仔細想想,這個行為也維持好多年了吧!...