Development environment configuration scripts for Ubuntu Desktop.
Not intended for production. Use at your own risk!
Goal: Reduce the time it takes to configure a new Ubuntu Desktop environment for software development.
-
Clone the repo:
git clone https://github.com/yaphott/ubuntu-config-scripts.git
-
Run the script:
cd ubuntu-config-scripts bash ./run.sh
-
A system upgrade will commence and the system will prompt to reboot.
-
After rebooting, run the script once more and respond to any prompts.
Testing occurs in 2 steps.
- Provision a base box and create a snapshot.
- Restore the snapshot and run the configuration scripts.
Creating the snapshot reduces the overall time needed to test the configuration scripts in a clean environment.
First time (base box + main box):
make test-cold
Subsequent times (main box):
make test-warm
Note: Password for the user is
vagrant
.
Add a keyring to the system by providing a key URL and the desired path for the keyring file.
add_keyring.sh <key_url> <keyring_path>
For example:
cd ./bin/utils
sudo bash add_keyring.sh https://example.com/apt/keys.asc \
/etc/apt/keyrings/example-keyring.gpg
Add a repository to the system by providing the key URL, distribution, components, and the desired path for the list file.
add_repository.sh <repo_options> <repo_uri> <repo_suite> <repo_components> <repo_file_path>
For example, if there is one component:
cd ./bin/utils
sudo bash add_repository.sh "arch=amd64 signed-by=/etc/apt/keyrings/example-keyring.gpg" \
https://example.com/example-pub.gpg \
stable \
main \
/etc/apt/sources.list.d/example.list
Or if there are multiple components:
cd ./bin/utils
sudo bash add_repository.sh "arch=amd64 signed-by=/etc/apt/keyrings/example-keyring.gpg" \
https://example.com/example-pub.gpg \
stable \
"main contrib non-free" \
/etc/apt/sources.list.d/example.list
Or if there are no components:
cd ./bin/utils
sudo bash add_repository.sh "arch=amd64 signed-by=/etc/apt/keyrings/example-keyring.gpg" \
https://example.com/example-pub.gpg \
stable \
none \
/etc/apt/sources.list.d/example.list
See Ubuntu Manpage:
sources.list
for more information on the format of the list file.
Each file starts with a check to ensure the necessary setup has been completed.