Dotfiles
are a very personal thing. They are shaped through years of experience, defeat, education, guidance taken, and ingenuity rewarded. Being without your personal configurations, you feel like a lost and helpless outsider in an unknown and hostile environment. You are uncomfortable and disoriented, yearning to return to a place of familiarity - a place you constructed through your own adventures, where all the shortcuts are well-traveled, and which you proudly call $HOME
.
- Clone the repository.
# Create space directory
$ mkdir -p ~/space
$ git clone git@github.com:Clivern/Kemet.git ~/space/kemet
- Install opswork and
pip
globally.
$ brew install yq
$ pip install ansible
$ pip install opswork
$ alias op=opswork
- Init the configs
$ op config init
$ op config dump
- Add local as a host.
$ make hosts
- Add dotfiles recipes.
$ make recipes
- Run recipes one by one or the needed ones. for example to run
clivern/ping
towards host with namelocalhost
.
$ op recipe run clivern/linux/ping -h localhost -v key=value
# To get the must have list
$ op recipe list -t must_have -o json | jq .
- To install dotfiles.
$ make run
- To run command either locally or remotely.
# Add a Remote Linux Host
$ op host add clivern -i ~x.x.x.x~ -p 22 -u ~user~ -s /Users/root/.ssh/id_rsa.pem
# Check Uptime
$ op recipe run clivern/linux/cmd -h clivern -v cmd="uptime"
# Ping Remote Host
$ op recipe run clivern/linux/ping -h clivern
# Update
$ op recipe run clivern/linux/update -h clivern
# Upgrade
$ op recipe run clivern/linux/upgrade -h clivern
# Force Reboot
$ op recipe run clivern/linux/cmd -h clivern -v cmd="reboot"
# SSH to any Host
$ op host ssh clivern
- Store the secrets in
OpsWork
vault.
$ op secret add clivern/ai/google_palm_api_key "~~" -t ai
$ op secret add clivern/ai/openai_api_key "~~" -t ai
- Secret can be loaded as environmental variable by adding it to
configs/secrets.j2
like the following.
$ export OPENAI_API_KEY="$(op secret get clivern/ai/openai_api_key -o json | jq '.[0].value')"
- To load secrets from terminal.
$ source ~/.secrets
- To list all recipes
$ op recipe list -o json | jq '.[].name'
© 2010, Clivern. Released under MIT License.
Kemet is authored and maintained by @clivern.