mirror of
https://github.com/zebrajr/HomeLab.git
synced 2025-12-06 00:20:22 +01:00
Squashing Commits
This commit is contained in:
commit
d10d5dc331
19
CHANGELOG.md
Normal file
19
CHANGELOG.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# HomeLab - Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## [0.1.0] - Start - 2021-03-02
|
||||
|
||||
ℹ️ **Note:**
|
||||
|
||||
### Added
|
||||
- sync-from-opportunity.sh - Syncs [local] from [remote]
|
||||
|
||||
### Updated
|
||||
|
||||
|
||||
### Deleted
|
||||
|
||||
|
||||
### Fixed
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020 zebrajr
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
15
README.md
Normal file
15
README.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# HomeLab
|
||||
Scripts used for starting my HomeLab stuff, either from scratch or moving between machines.
|
||||
### Situation
|
||||
|
||||
|
||||
### Task
|
||||
|
||||
|
||||
### Result
|
||||
|
||||
|
||||
### Note
|
||||
|
||||
### ToDo
|
||||
- Change sync-from-opportunity.sh to use .env file
|
||||
4
Ubuntu-Server/Scripts/install-docker.sh
Normal file
4
Ubuntu-Server/Scripts/install-docker.sh
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
sudo apt update -y && \
|
||||
sudo apt upgrade -y && \
|
||||
sudo apt install docker -y && \
|
||||
sudo apt install docker-compose -y
|
||||
40
Xubuntu-Daily/001-xubuntu-deploy.sh
Executable file
40
Xubuntu-Daily/001-xubuntu-deploy.sh
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
start=`date +%s`
|
||||
source secrets.cfg
|
||||
echo "Setting Hostname..."
|
||||
sudo hostname ${clienthostname}
|
||||
echo "Adding Repositories..."
|
||||
sudo add-apt-repository ppa:xubuntu-dev/extras -y &> ${PWD}/001.log
|
||||
echo "Updating and Upgrading..."
|
||||
sudo apt update -y &> /dev/null
|
||||
sudo apt upgrade -y &> /dev/null
|
||||
echo "Installing: htops, kvm and it's utilities..."
|
||||
sudo apt install htop -y &> /dev/null
|
||||
sudo apt install qemu-kvm -y &> /dev/null
|
||||
sudo apt install virt-manager -y &> /dev/null &&
|
||||
sudo apt install libvirt-daemon-system -y &> /dev/null &&
|
||||
sudo apt install libvirt-clients -y &> /dev/null &&
|
||||
sudo apt install bridge-utils -y &> /dev/null&&
|
||||
echo "Adding user < ${USER} > to VM groups..."
|
||||
sudo adduser ${USER} libvirt
|
||||
sudo adduser ${USER} kvm
|
||||
echo "Installing OpenVPN & Git & NFS Tools"
|
||||
sudo apt install git -y &> /dev/null
|
||||
sudo apt install openvpn -y &> /dev/null &&
|
||||
sudo apt install network-manager-openvpn -y &> /dev/null
|
||||
sudo apt install nfs-common -y &> /dev/null
|
||||
echo "Installing Q.O.L. - Eg: HotCorners..."
|
||||
sudo apt install xfdashboard -y &> /dev/null
|
||||
echo "Removing Bloatware..."
|
||||
sudo apt remove gnome-mines -y &> /dev/null &&
|
||||
sudo apt remove sgt-launcher -y &> /dev/null &&
|
||||
sudo apt remove transmission-gtk -y &> /dev/null &&
|
||||
sudo apt remove parole -y &> /dev/null &&
|
||||
sudo apt remove WebBrowser -y &> /dev/null &&
|
||||
echo "Configuring Git to User < ${gituser} >"
|
||||
git config --global user.name ${gituser}
|
||||
git config --global user.email ${gitemail}
|
||||
echo "Cleaning Up"
|
||||
sudo apt auto-remove -y &> /dev/null
|
||||
end=`date +%s`
|
||||
runtime=$((end-start))
|
||||
echo "Total Run Time: ${runtime} Seconds."
|
||||
7
Xubuntu-Daily/002-xubuntu-git.sh
Executable file
7
Xubuntu-Daily/002-xubuntu-git.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
source secrets.cfg
|
||||
echo "Creating Directories"
|
||||
mkdir ~/GitHub &> log002.log
|
||||
cd ~/GitHub &> log002.log
|
||||
echo "Cloning Repos..."
|
||||
git clone ${gitrepo001} &> log002.log
|
||||
git clone ${gitrepo002} &> log002.log
|
||||
1
Xubuntu-Daily/800-company-vpn.sh
Executable file
1
Xubuntu-Daily/800-company-vpn.sh
Executable file
|
|
@ -0,0 +1 @@
|
|||
sudo openvpn --config client.opvn
|
||||
10
Xubuntu-Daily/900-xubuntu-update.sh
Executable file
10
Xubuntu-Daily/900-xubuntu-update.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
echo Updating...
|
||||
start=`date +%s`
|
||||
sudo apt update -y &> /dev/null &&
|
||||
echo Upgrading...
|
||||
sudo apt upgrade -y &> /dev/null &&
|
||||
echo Removing Old Packages...
|
||||
sudo apt auto-remove -y &> /dev/null
|
||||
end=`date +%s`
|
||||
runtime=$((end-start))
|
||||
echo Total Update Time: ${runtime} seconds!
|
||||
0
Xubuntu-Daily/secrets.cfg.sample
Normal file
0
Xubuntu-Daily/secrets.cfg.sample
Normal file
7
Xubuntu-Daily/todo.yaml
Normal file
7
Xubuntu-Daily/todo.yaml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
- Download & Install Atom / Opera Automatically
|
||||
- Add User and Set Password automatically
|
||||
- Add Summary from Setup at Start
|
||||
- Set Delay before continuing after summary
|
||||
- Add .gitignore:
|
||||
secrets.cfg
|
||||
client.opvn
|
||||
1
clone-from-repo.sh
Normal file
1
clone-from-repo.sh
Normal file
|
|
@ -0,0 +1 @@
|
|||
git clone https://github.com/zebrajr/HomeLab
|
||||
5
curiosity/rsync/config.sh-sample
Normal file
5
curiosity/rsync/config.sh-sample
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
export TARGETUSER="remote user eg: docker-user"
|
||||
export TARGETIP="remote ip eg: 10.50.20.5"
|
||||
export TARGETFOLDER="folder to sync from eg: /home/docker-user/"
|
||||
export SOURCEKEY="RSA private key location eg: /home/rsync/.ssh/curiosity"
|
||||
export SOURCEFOLDER="destination folder eg: /mnt/raid1/opportunity-clone/"
|
||||
12
curiosity/rsync/sync-from-opportunity.sh
Normal file
12
curiosity/rsync/sync-from-opportunity.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Don't forget to add the script to anacron for automatic sync
|
||||
# sudo nano /etc/anacrontab
|
||||
# Run Every Day / If not executed wait 15 minutes after system boot / Unique Name / Script Location
|
||||
# 1 15 syncFromOpportunity.daily /bin/sh /home/rsync/sync-from-opportunity.sh
|
||||
|
||||
. ./home/rsync/config.sh
|
||||
|
||||
|
||||
|
||||
rsync --progress -avz -e "ssh -i ${SOURCEKEY}" $TARGETUSER@$TARGETIP:$TARGETFOLDER $SOURCEFOLDER
|
||||
1
update-from-main-repo.sh
Normal file
1
update-from-main-repo.sh
Normal file
|
|
@ -0,0 +1 @@
|
|||
git pull origin main
|
||||
Loading…
Reference in New Issue
Block a user