Code Monkey home page Code Monkey logo

cide's Introduction

CIDE

Note: this repository needs to be cleaned up and refactored. There are many roles and playbooks that are not used anymore, and some of them are not even working. I'm planning to do this in the nearest future. Don't use this repository as a reference for now.

This repository contains playbooks and roles, that I use to:

  • Configure my local development environment, from wallpapers and keyboard shortcuts to byobu and VSCode.
  • Configure my remote development environment on a dedicated server, which usually does all heavy lifting.
  • Deploy many other self-hosted services, such as SearX or Firefly III.

Getting Started

Localhost

Before OS reinstall

  1. Backup database:
    cp -r ~/PersonalVault /media/<username>/<ID>/PersonalVault
  2. Backup zsh history:
    cp ~/.zsh_history /media/<username>/<ID>/.zsh_history
  3. Check that KeePass database isn't corrupted.

After OS reinstall

  1. Upgrade packages:
    sudo apt update && sudo apt upgrade -y
  2. Install required packages:
    sudo apt install -y git keepassxc python3 python3-pip python3-virtualenv make
  3. Clone CIDE repo:
    mkdir -p ~/Projects && cd ~/Projects
    git clone https://github.com/0x29a/cide.git --recursive && cd cide
  4. Insert backup USB, open KeePassXC (SSH) and export ssh keys to the ~/.ssh/ directory.
  5. Create .vars.private.yml and put to it all necessary secrets from KeePassXC (CIDE private vars):
    cp example.vars.private.yml .vars.private.yml
  6. [Optionally] Put zsh history in place:
    cp /media/<username>/<ID>/.zsh_history playbooks/roles/zsh/files/.zsh_history.localhost
  7. Run installation:
    make set_up_localhost
  8. Log in and log out to activate new default shell.
  9. Open Syncthing Web UI, remove default folder and configure all devices.
  10. [TO AUTOMATE] Add a new keyboard layout and set shortcut.
  11. [TO AUTOMATE] Install Tor Browser.
  12. [TO AUTOMATE] Reverse touchpad scroll.
  13. [TO AUTOMATE] Add custom certificates for Vault.
  14. [TO AUTOMATE] OBS collections and profiles import.

Provisioning CIDE

  1. Add the following to /etc/hosts:
    <ide_server_ip_address> cloud
    
  2. Create .vars.private.yml and put to it all necessary secrets:
    cp example.vars.private.yml .vars.private.yml
  3. [Optionally] Put zsh history in place:
    cp /media/<username>/<ID>/.zsh_history playbooks/roles/zsh/files/.zsh_history.cloud
  4. Update Toggl transfer script timestamp in roles/opencraft/files/.latest.
  5. Add an additional IP address: sudo ip address add <SECONDARY_IP_ADDRESS>/32 dev <INTERFACE>.
  6. Run playbook to deploy user and SSH keys:
    make bootstrap
  7. If user and SSH keys were deployed successfully, deploy everything else:
    make deploy
  8. Change default SSH port for CIDE, add the following to ~/.ssh/config:
    Host cloud
        HostName cloud
        Port 2123
        ForwardAgent yes
    
  9. Open SSH tunnel, open 127.0.0.1:8137 and install these addons:
    1. bungcip.better-toml
    2. ms-azuretools.vscode-docker
    3. dbaeumer.vscode-eslint
    4. eamodio.gitlens
    5. ms-toolsai.jupyter.
    6. ms-python.python.
    7. vscode-icons-team.vscode-icons.
    8. redhat.vscode-yaml.
    9. esbenp.prettier-vscode.
    10. ms-vscode.vscode-typescript-tslint-plugin.
    11. sainnhe.gruvbox-material.

cide's People

Contributors

0x29a avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.