MacBookAirが修理から帰ってきてやっていったこと
起動後のウィザード(無線の候補に自宅のWiFiが出てこなかったので有線で接続)
Apple ID・Apple Pay 設定
WiFi設定
じぶん esa に Google ログイン
ファンクションキーを有効にしたい。。
右クリックができるようにしたい。。
↑2つ、どっちもやった(次コメントの、「初期設定」 の枠組みの中で)
2020年5月の「初回」もそうだったようだが、↓をベースに設定
メモ:後で ↑の記事にコメント入れる
出ていたエラー
Error: Calling `brew cask upgrade` is disabled! Use brew upgrade [--cask] instead.
brew upgrade --cask
でやればOK
% brew -v
Homebrew 2.7.7
Homebrew/homebrew-core (git revision ce8c6c; last commit 2021-01-29)
Homebrew/homebrew-cask (git revision fdf60; last commit 2021-01-29)
Ansible のインストール
brew install python ansible
・・・
% python -V
Python 2.7.16
% python3 -V
Python 3.8.2
% ansible --version
ansible 2.10.5
config file = None
configured module search path = ['/Users/sogaoh/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.10.6/libexec/lib/python3.9/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.9.1 (default, Jan 8 2021, 17:17:17) [Clang 12.0.0 (clang-1200.0.32.28)]
%
Git の設定
SSH の設定
(生きてるマシンから config や key をかき集め)
インストール大会の前に mackerel-agent 入れようとしたら
先にターミナルのアクセシビリティを弄っておかないといけなかったようで、
error なんでだろう・・・なんでだろう・・・になった(解決した)
入れていくのはいつもよく使ってる信頼してるソフト群だが、念のためここでウィルス対策ソフトを入れる。
brew では入れられないこともわかっていたので。(それが何かはあえて言わないが)
某ウィルス対策ソフトをインストール後、make zsh
で prezto を入れて、 make dot
で .zshrc をこれまでのものにしたのだが、クラウド系のクレデンシャルを設定してなくてワーニングの山
Warnings
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
/Users/sogaoh/.zshrc:116: command not found: direnv
/Users/sogaoh/.zshrc:123: command not found: anyenv
~/temp/mba-provisioner master
確認してみると、設定してた数とワーニングの数が見事に一致。
1/30 0:14 インストール大会開始( make packages
)
ちょっとはずしてたら某ウィルス対策ソフトのネットワークワーニングが出て止まってた。。
yarn のところから進まない ? と思ったがターミナル上部は激しく動いていた...
homebrew パート完了 1:33 頃
gem, npm, pip パート完了 1:52 頃
バージョン確認大会(一部飛ばしてる。起動時にエラーが出てしまう vim など)
~
❯ ghq --version
ghq version 1.1.5 (rev:f5ac3e5)
~
❯ peco --version
peco version v0.5.8 (built with go1.14.5)
~
❯ tmux -V
tmux 3.1c
~
❯ git --version
git version 2.30.0
~
❯ curl --version
curl 7.64.1 (x86_64-apple-darwin19.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.39.2
Release-Date: 2019-03-27
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL UnixSockets
~
❯ tree --version
tree v1.8.0 (c) 1996 - 2018 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro
~
❯ nkf --version
Network Kanji Filter Version 2.1.5 (2018-12-15)
Copyright (C) 1987, FUJITSU LTD. (I.Ichikawa).
Copyright (C) 1996-2018, The nkf Project.
~
❯ jq --version
jq-1.6
~
❯ pigz --version
pigz 2.5
~
❯ exa --version
exa v0.9.0
~
❯ bat --version
bat 0.17.1
~
❯ fd --version
fd 8.2.1
~
❯ sd --version
sd 0.7.6
~
❯ rg --version
ripgrep 12.1.1
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)
~
❯ procs --version
procs 0.11.1
~
❯ tokei --version
tokei 12.1.2 compiled with serialization support: json, cbor, yaml
~
❯ gitui --version
gitui 0.9.0
~
❯ duf --version
duf 0.5.0 (4c15e83)
~
❯ ctop -v
ctop version 0.7.5, build c971d26 go1.15.3
❯ tfenv --version
tfenv 2.0.0
~
❯ terraformer --version
version v0.8.10
~
❯ aws --version
aws-cli/2.1.22 Python/3.9.1 Darwin/19.6.0 source/x86_64 prompt/off
~
❯ az --version
azure-cli 2.18.0
core 2.18.0
telemetry 1.0.6
Python location '/usr/local/Cellar/azure-cli/2.18.0/libexec/bin/python'
Extensions directory '/Users/sogaoh/.azure/cliextensions'
Python (Darwin) 3.8.7 (default, Dec 30 2020, 10:13:08)
[Clang 12.0.0 (clang-1200.0.32.28)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Please let us know how we are doing: https://aka.ms/azureclihats
and let us know if you're interested in trying out our newest features: https://aka.ms/CLIUXstudy
~
❯ mysql --version
mysql Ver 8.0.23 for osx10.15 on x86_64 (Homebrew)
~
❯ ov --version
ov version 0.8.0 rev:ba2516b
~
❯ trdsql --version
trdsql version v0.8.0
~
❯ psql --version
psql (PostgreSQL) 13.1
~
❯ yarn --version
1.22.10
~
❯ direnv --version
2.27.0
~
❯ anyenv --version
zsh: correct 'anyenv' to '.anyenv' [nyae]? n
anyenv 1.1.2
~
❯ certbot --version
certbot 1.11.0
~
❯ composer -V
Composer version 2.0.9 2021-01-27 16:09:27
❯ ecspresso version
ecspresso v1.3.2
~
❯ csvq --version
csvq version 1.13.7
~
❯ hugo version
Hugo Static Site Generator v0.80.0/extended darwin/amd64 BuildDate: unknown
~
❯ ffmpeg
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with Apple clang version 12.0.0 (clang-1200.0.32.28)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_9 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
~
❯ yq --version
yq version 4.4.1
~
❯ tflint --version
TFLint version 0.23.1
~
❯ waypoint version
Waypoint v0.2.0 (360b2b3a)
~
❯ circleci version
0.1.11924+e7b4dae (homebrew)
❯ bundler --version
Bundler version 2.2.7
~
❯ firebase --version
9.2.2
~
❯ now --version
Now CLI 21.0.1
21.0.1
~
❯ heroku version
heroku/7.47.11 darwin-x64 node-v15.7.0
~
❯ sls --version
Framework Core: 2.21.1
Plugin: 4.4.2
SDK: 2.3.2
Components: 3.6.0
~
❯ fab -V
Fabric 2.6.0
Paramiko 2.7.2
Invoke 1.5.0
~
❯ ansible-lint --version
ansible-lint 4.3.7
.vimrc で color shema がない の E185 エラーが出るのを回避、.zshrc の direnv, anyenv 設定を戻して make dot
❯ vi roles/packages/tasks/main.yml
Error detected while processing /Users/sogaoh/.vimrc:
line 7:
E185: Cannot find color scheme 'base16-tomorrow-night'
Press ENTER or type command to continue
~/temp/mba-provisioner master* 3m 35s
❯ make dot
ansible-playbook mba-02.yml -i "localhost," --tags=dotfiles
PLAY [localhost] *************************************************************************************************************************************************************************************************************************************************
TASK [dotfiles : Copy dotfiles to home directory] ****************************************************************************************************************************************************************************************************************
ok: [localhost] => (item=.zlogin)
ok: [localhost] => (item=.zlogout)
ok: [localhost] => (item=.zpreztorc)
ok: [localhost] => (item=.zprofile)
ok: [localhost] => (item=.zshenv)
changed: [localhost] => (item=.zshrc)
changed: [localhost] => (item=.vimrc)
ok: [localhost] => (item=.my.cnf)
ok: [localhost] => (item=.psqlrc)
PLAY RECAP *******************************************************************************************************************************************************************************************************************************************************
localhost : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
~/temp/mba-provisioner master* 11s
別ターミナル開いたらワーニング出たので言う通りに対応(anyenv install --init)
Last login: Sat Jan 30 01:16:18 on ttys002
ANYENV_DEFINITION_ROOT(/Users/sogaoh/.config/anyenv/anyenv-install) doesn't exist. You can initialize it by:
> anyenv install --init
~/temp/mba-provisioner master*
❯ anyenv install --init
Manifest directory doesn't exist: /Users/sogaoh/.config/anyenv/anyenv-install
Do you want to checkout ? [y/N]: y
Cloning https://github.com/anyenv/anyenv-install.git master to /Users/sogaoh/.config/anyenv/anyenv-install...
Cloning into '/Users/sogaoh/.config/anyenv/anyenv-install'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 62 (delta 1), reused 1 (delta 0), pack-reused 57
Receiving objects: 100% (62/62), 10.52 KiB | 2.10 MiB/s, done.
Resolving deltas: 100% (8/8), done.
Completed!
~/temp/mba-provisioner master* 8s
バージョン確認 その2
❯ rsync --version
rsync version 3.2.3 protocol version 31
Copyright (C) 1996-2020 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, hardlink-specials, symlinks, IPv6, no atimes,
batchfiles, inplace, append, ACLs, xattrs, optional protect-args, iconv,
symtimes, no prealloc, stop-at, crtimes, file-flags
Optimizations:
SIMD, asm, openssl-crypto
Checksum list:
xxh128 xxh3 xxh64 (xxhash) md5 md4 none
Compress list:
zstd lz4 zlibx zlib none
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
❯ wget --version
GNU Wget 1.21.1 built on darwin19.6.0.
-cares +digest -gpgme +https +ipv6 +iri +large-file -metalink +nls
+ntlm +opie -psl +ssl/openssl
Wgetrc:
/usr/local/etc/wgetrc (system)
ロケール:
/usr/local/Cellar/wget/1.21.1/share/locale
コンパイル:
clang -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wgetrc"
-DLOCALEDIR="/usr/local/Cellar/wget/1.21.1/share/locale" -I.
-I../lib -I../lib -I/usr/local/opt/openssl@1.1/include -DNDEBUG -g
-O2
リンク:
clang -DNDEBUG -g -O2 -lidn2 -L/usr/local/opt/openssl@1.1/lib -lssl
-lcrypto -ldl -lz ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a
-liconv -lintl -Wl,-framework -Wl,CoreFoundation -lunistring
Copyright (C) 2015 Free Software Foundation, Inc.
ライセンス GPLv3+: GNU GPL バージョン 3 あるいはそれ以降のバージョン
<http://www.gnu.org/licenses/gpl.html>.
このソフトウェアはフリーソフトウェアです。自由に変更、再配布ができます。
法律が許すかぎり、全くの無保証です。
Hrvoje Niksic <hniksic@xemacs.org> によって書かれました。
バグ報告や質問は<bug-wget@gnu.org>へ
1/30 2:11 cask だけにして make packages
実行
28分半で1回目完了
Cask のを入れていく大会の前に、 Alfred と iTerm2 の設定を好みに調整
Alfred
- Features
- Clipboard History
- Keep Plain Text -> 7 Days
- Keep Images -> 24 Hours
- Keep File Lists -> 24 Hours
- Snippets
- <<d ->
<details><summary></summary> ... </details>
: システム環境設定 -> アクセシビリティの開放が必要
- <<d ->
- Clipboard History
iTerm2
- Profiles
- General
- Working Directory を
Reuse previous session's directory
に
- Working Directory を
- Window
- Transparency : about 30%
- Columns : 160, Rows : 40
- Colors
- Color Presets に iceberg を設定
-
[command] + [shift] + [.(ドット)]
でファイル選択ダイアログにて . 付きのディレクトリを表示させる技を知った
-
- Color Presets に iceberg を設定
- Text
- Font
- size を 10 に
- Font
- General
1/30 10:04 コメントアウトしてたりしてた cask packages を開放して make packages 実行
17分半で完了(sudo パスワード求められたのは1回 : おそらく adobe-acrobat-reader)
コメントアウト解除箇所
gcloud コマンドがない(そうではなかったが)感じだったので
を見てパッケージから入れようかと思ったのだがインストールがコケる。(Python 関連っぽい)パッケージからのインストール失敗
~/temp/mba-provisioner master
❯ which gcloud
gcloud not found
~/temp/mba-provisioner master
❯ python -V
Python 2.7.16
~/temp/mba-provisioner master
❯ cd ~/temp
~/temp
❯ wget 'https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-308.0.0-darwin-x86_64.tar.gz?hl=ja'
--2021-01-30 11:51:56-- https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-308.0.0-darwin-x86_64.tar.gz?hl=ja
dl.google.com (dl.google.com) をDNSに問いあわせています... 172.217.31.174
dl.google.com (dl.google.com)|172.217.31.174|:443 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 85503322 (82M) [application/octet-stream]
`google-cloud-sdk-308.0.0-darwin-x86_64.tar.gz?hl=ja' に保存中
google-cloud-sdk-308.0.0-darwin-x86_64.tar.gz?hl=ja 100%[===================================================================================================================================================================>] 81.54M 16.8MB/s 時間 4.4s
2021-01-30 11:52:01 (18.5 MB/s) - `google-cloud-sdk-308.0.0-darwin-x86_64.tar.gz?hl=ja' へ保存完了 [85503322/85503322]
~/temp
❯ ls
google-cloud-sdk-308.0.0-darwin-x86_64.tar.gz?hl=ja mba-provisioner mba2-20210129T104612Z-001.zip
~/temp
❯ tar xzf google-cloud-sdk-308.0.0-darwin-x86_64.tar.gz\?hl=ja
~/temp 6s
❯ ls
google-cloud-sdk google-cloud-sdk-308.0.0-darwin-x86_64.tar.gz?hl=ja mba-provisioner
~/temp
❯ cd google-cloud-sdk
~/temp/google-cloud-sdk
❯ ./install.sh
Welcome to the Google Cloud SDK!
Traceback (most recent call last):
File "/Users/sogaoh/temp/google-cloud-sdk/bin/bootstrapping/install.py", line 12, in <module>
import bootstrapping
File "/Users/sogaoh/temp/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 32, in <module>
import setup # pylint:disable=g-import-not-at-top
File "/Users/sogaoh/temp/google-cloud-sdk/bin/bootstrapping/setup.py", line 57, in <module>
from googlecloudsdk.core.util import platforms
File "/Users/sogaoh/temp/google-cloud-sdk/lib/googlecloudsdk/__init__.py", line 23, in <module>
from googlecloudsdk.core.util import importing
File "/Users/sogaoh/temp/google-cloud-sdk/lib/googlecloudsdk/core/util/importing.py", line 23, in <module>
import imp
File "/usr/local/Cellar/python@3.9/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 23, in <module>
from importlib import util
File "/usr/local/Cellar/python@3.9/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/util.py", line 2, in <module>
from . import abc
File "/usr/local/Cellar/python@3.9/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/abc.py", line 17, in <module>
from typing import Protocol, runtime_checkable
File "/usr/local/Cellar/python@3.9/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 26, in <module>
import re as stdlib_re # Avoid confusion with the re we export.
File "/usr/local/Cellar/python@3.9/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/re.py", line 124, in <module>
import enum
File "/Users/sogaoh/temp/google-cloud-sdk/lib/third_party/enum/__init__.py", line 26, in <module>
spec = importlib.util.find_spec('enum')
AttributeError: module 'importlib' has no attribute 'util'
~/temp/google-cloud-sdk
brew cask google-cloud-sdk
で検索したところ情報があり、
どうやら PATH が効いてないだけみたいな感じなので倣って設定を入れてみる
gcloud をさがせ
~/temp/google-cloud-sdk
❯ brew search google-cloud-sdk
==> Casks
google-cloud-sdk ✔
~/temp/google-cloud-sdk 12s
❯ which google-cloud-sdk
google-cloud-sdk not found
~/temp/google-cloud-sdk
❯ ls -la $(brew --prefix)/Caskroom/google-cloud-sdk/
total 0
drwxr-xr-x 4 sogaoh admin 128 1 30 10:15 .
drwxrwxr-x 22 sogaoh admin 704 1 30 10:19 ..
drwxr-xr-x 4 sogaoh admin 128 1 30 10:17 .metadata
drwxr-xr-x@ 3 sogaoh admin 96 1 30 10:16 latest
~/temp/google-cloud-sdk
.zshrc に設定追加
❯ vi roles/dotfiles/files/.zshrc
~/temp/mba-provisioner master* 1m 13s
❯ git diff roles/dotfiles/files/.zshrc
diff --git a/roles/dotfiles/files/.zshrc b/roles/dotfiles/files/.zshrc
index 51da5d6..75fa7e5 100644
--- a/roles/dotfiles/files/.zshrc
+++ b/roles/dotfiles/files/.zshrc
@@ -38,6 +38,9 @@ fpath=(path/to/zsh-completions/src $fpath)
# gcloud
#export GOOGLE_APPLICATION_CREDENTIALS=$(security find-generic-password -s "gcloud auth path" -w)
#export GOOGLE_CREDENTIALS=$(security find-generic-password -s "gcloud auth path" -w)
+source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc"
+source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc"
+
# az(azure-cli)
export ARM_SUBSCRIPTION_ID=$(security find-generic-password -s "azure subscription id" -w)
~/temp/mba-provisioner master*
~/temp/mba-provisioner master*
❯ make dot
ansible-playbook mba-02.yml -i "localhost," --tags=dotfiles
PLAY [localhost] ****************************************************************************************************************************************************************************************************************************************************************
TASK [dotfiles : Copy dotfiles to home directory] *******************************************************************************************************************************************************************************************************************************
ok: [localhost] => (item=.zlogin)
ok: [localhost] => (item=.zlogout)
ok: [localhost] => (item=.zpreztorc)
ok: [localhost] => (item=.zprofile)
ok: [localhost] => (item=.zshenv)
changed: [localhost] => (item=.zshrc)
ok: [localhost] => (item=.vimrc)
ok: [localhost] => (item=.my.cnf)
ok: [localhost] => (item=.psqlrc)
PLAY RECAP **********************************************************************************************************************************************************************************************************************************************************************
localhost : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
~/temp/mba-provisioner master* 7s
ひとまず入ったっぽい
Last login: Sat Jan 30 11:32:24 on ttys010
~/temp/mba-provisioner master*
❯ which gcloud
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud
~/temp/mba-provisioner master*
❯ gcloud --version
Google Cloud SDK 325.0.0
bq 2.0.64
core 2021.01.22
gsutil 4.58
~/temp/mba-provisioner master*
ここで感じたのは、クレデンシャル喪失がイタイ。。