For general information about this repo and related ones, please see Provision Lightweight Development Environments.
From: No operating system installed.
To: Manjaro configured to receive provisioning to customize it for software development.
Download iso from https://manjaro.org.
Create a VM using the downloaded iso. Give it 2 GB memory and a 20 GB virtual drive.
(This is not quite as lightweight as we really want; we're aiming for a maximum memory footprint of 1 GB. But this could be useful for people who have sufficient memory available and who prefer the Arch way of doing things.)
On the boot menu, arrow down to the option "Boot: Manjaro.x86_64 xfce" and press Enter to start. It will boot to an xfce desktop. It is very slow. Don't panic if you see a black screen for 30-40 seconds.
WARNING: A "Welcome" dialog appears with a button to "Launch installer". Do not touch that button. Exit out of the "Welcome dialog" immediately.
Open a terminal window, either by right-clicking on the desktop and choosing "Terminal" or by clicking on the green icon in the lower left-hand corner of the display and choosing "Terminal".
WARNING: If you open the terminal from the context menu (right-click on the desktop), it will open in subdirectory /home/dev/Desktop
. You want to be in the home directory of user 'dev'. Double-check where you are before entering commands.
Start the installer from the command line:
cd
sudo calamares
Follow the prompts in the usual way. Create an administative user with name 'Developer', username 'dev', and password 'developer'. Select "Use the same password for the administrator account".
WARNING: When the install gets to the stage of "Unsquash filesystem", expect it to slow down considerably. You might imagine it's hung when it hits about 24% to 26%.
Eventually, the installer will proclaim "All done" and invite you to reboot. Select the "Restart now" checkbox and press the "Done" button.
From the GNU GRUB menu, choose "Manjaro Linux". If all is well, that will take you to a login form that has been pre-filled with the name of the user you created during installation. Enter the password and see if the login works.
Because of the way the Arch package manager, Pacman, works, you need to synchronize the system before installing any packages. Otherwise, there is a risk dependencies will be at the wrong versions and things won't work.
Login as 'dev'. Dismiss the "hello" dialog. Open a terminal emulator.
Before updating the system, you have to choose mirrors that pacman will use to download packages. The mirrors change in availability, speed, and currency. Failing to update the mirror list can cause the system to break, as you can inadvertently install the wrong versions of libraries.
This command will select the fastest up-to-date 5 mirrors and run pacman to synchronize your system:
sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu
Now reboot.
reboot
If the system will not boot, there was likely a problem with synchronizing. If the system boots, log in again as 'dev'. Dismiss the "hello" dialog. Open a terminal emulator and continue with Step 2.
This will install enough software on the instance to enable it to be used as a template for building software development environments tailored to different programming languages and development/testing tools.
The provisioning scripts are on Github. The instance needs git support to clone the repository and complete the configuration.
sudo pacman -Sy git
Check the git version as a way to see if it was installed:
git --version
cd
git clone git://github.com/neopragma/bootstrap-manjaro-dev-base
cd
mkdir bin
chmod +x bin
Add $HOME/bin to the PATH in .bashrc
. Add this line to the end of .bashrc
.
PATH="$HOME/bin:$PATH"
If you want your template to be configured differently than the default, make the necessary changes.
In particular, look at:
The directory structure of the provisioning repository looks like this:
bootstrap-manjaro-dev-base/
bootstrap Bash script to provision the instance.
neovim/ => $HOME/.config/nvim/
If all goes well, this will provision the instance as a base or template for building development environments. Check the results carefully in case of errors. There are many steps and anything can happen despite care in preparing the script.
cd $HOME/bootstrap-debian-9-dev-base
./bootstrap
This will not run unattended. After installing Ruby, it will execute some commands that require sudo
. At that point, it will prompt for the password, 'developer'.
sudo pip install --upgrade pip
pip install --user neovim
pip3 install --user neovim
One-time run of :UpdateRemotePlugins for certain plugins.
- Start neovim
- Run the editor command :UpdateRemotePlugins
- Quit neovim
As a workaround, add these lines to $HOME/.config/nvim/init.vim
:
let g:NERDTreeDirArrowExpandable="+"
let g:NERDTreeDirArrowCollapsible="~"
When you are satisfied the environment is configured correctly, you can delete directory $HOME/bootstrap-manjaro-dev-base
.
This version of the dev base environment differs from the others due to certain issues in configuring it.