ããã«ã¡ã¯
ããªã¥ã¼ã®ãã¯ããªã³ã¯éçºããã¦ãããããã§ãã
ä»åã社å
ã®éçºç°å¢æ§ç¯ç¨ã®è¨å®ãæè§ä½ã£ãã®ã§ã¡ãã£ã¨å
¬éãã¦ããããã¨
ã¨ããäºã§ansibleã§ã®å®è¡ç°å¢ãããããã®ã§è²ã 追å /åé¤ããªããåããã¦ã¿ã¦ãã ããã
https://github.com/furyu-awata/dev-env/
æ±ç¨ã«ä½¿ããããªé¨åããã³ããããã¦ã¾ããã
ç°å¢ã«ã¤ãã¦
æè¿MACå¢ãããããããããã©ãããããã¯Ubuntu使ã£ã¦ã¾ãã
ä¸é¨Windowså¢ãwslã§ç°å¢ãä½ã£ãããã¦ããããã©ãããªã³ã©ã¤ã³ã§ç»é¢å
±æããããã¦ããæã«ããã®æä½ãªã«ï¼ã£ã¦ãªã£ãããã¦ãã®ã§ãUbuntuç°å¢ã®ä¸é¨ãwslã§æ§ç¯ã§ããããã«æ´åãã¦ã¿ã¾ããã
æ§ç¯æ¹æ³
ã¨ããããwslç°å¢ã«ç¹åãã¦ããç°¡æçãªç°å¢ã¨ãã¦ãã¾ãã
ããªã¯Ubuntuã§åºå®ã¨ãããã¨ã§â¦
wslã¤ã³ã¹ãã¼ã«
powershellã§å®è¡ãã¾ãããã
wsl --update dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart wsl --set-default-version 2 wsl --install -d ubuntu
ã§ããwslã®ã«ãã°ã¤ã³ãã¦ä»¥ä¸ãå®è¡ãã¦ããã¾ãã
echo "$(whoami) ALL=(ALL:ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/root sudo apt update sudo apt upgrade
äºåæºåçãª
ansibleã¨ãgitãªã©äºåæºåçãªãã¨ããã¦ããã¾ãã
sudo apt install openssh-server git ansible sudo systemctl enable ssh sudo systemctl start ssh ssh-copy-id localhost
ansibleã§ã¤ã³ã¹ãã¼ã«ãå®è¡
git clone https://github.com/furyu-awata/dev-env.git cd dev-env/ansible ansible-playbook -i inventory/local playbook-wsl.yml
ãããããã«wsl-vpnkitã®ã¤ã³ã¹ãã¼ã«ãå ¥ãã¦ããã°ããã£ããªã¨ä»ã«ãªã£ã¦å¾æä¸ã
ç°å¢æ§ç¯
dotfilesããå¿ è¦ãªæ å ±ãåã£ã¦ãã¦${HOME}ã®è¨å®ã«è¿½å ãã¦ããã ãã®ãã¨zshã«ããã®ã«
chsh -s /usr/bin/zsh
ããã¦ãªãã°ã¤ã³ ãã®æ®µéã§miseãå¹ãã¯ããªã®ã§
mise use -g awscli@latest mise use -g github-cli@latest mise use -g direnv@latest
ãã¾ãã
å¿
è¦ã«å¿ãã¦
mise use -g oci@latest mise use -g terraform@latest mise use -g task@latest
ãªã©ã追å
direnv㯠mise set {å¤æ°å}={å¤}
ã§ãè¨å®ã§ãã¾ãããæã
ã³ã¡ã³ãã¢ã¦ããã¦ã³ãã³ãå®è¡å¾ããã«ã³ã¡ã³ãã¤ã³ãããããéç¨ããããç°å¢ãããã®ã§ direnv edit .
ã§ããç°å¢ãæ®ãã¦ããã®ã好ã¿ã¨ããäºãããã®ã§å®æ½ãã¦ããã¾ãã
è¬è¾
æ¬å½ã¯PCã«Ubuntuãã¤ã³ã¹ãã¼ã«ãããã¨ã«ç°å¢ãæ§ç¯ãããã«ã»ããã®ansibleãããããã©ããè²ã
åé¡ãããè¨å®ãå
¥ã£ã¦ããã®ã§ãä»åã¯ãµãã»ãããä½æãã¦ãã®ç´¹ä»ã¨ãªãã¾ããã
ãå½¹ã«ç«ã¡ã¾ããã幸ãã§ãã