Repository navigation
Setup Development Environment
Legend:
- :# - Run in root shell or add 'sudo' to start of line
- :$ - Run as user
- :% - Run on host operating system
- -- - Comment
-
Download: http://cdimage.ubuntu.com/ubuntu-server/daily/current/xenial-server-amd64.iso
-
VMWare: New -> Install from disc or image -> Select xenial-server-amd64.iso -> Enter account info
-
Add fixed-address for virtual machine in dhcpd configuration - this is how to do it on Mac OS X / VMWare Fusion :% sudo vim /Library/Preferences/VMware\ Fusion/vmnet8/dhcpd.conf host ubus { hardware ethernet 00:0C:29:XX:XX:XX; fixed-address 192.168.225.129; option domain-name-servers 192.168.225.2 8.8.8.8; }
-
Install VMWare Tools
:# apt-get install open-vm-tools-- :# vmhgfs-fuse .host:/ /mnt/hgfs -
Install editor
:# apt-get install vim -
Graphics: 1600x1200 = 796/798/799 ; 1280x1024 = 775/794/795 ; 1024x768 = 773/791/792
:# vim /etc/default/grub:GRUB_CMDLINE_LINUX_DEFAULT="splash vga=798"#GRUB_GFXMODE=1600x1200x16:# update-grub2 -
Enable Mouse
:# apt-get install gpm -
Change hostname to ubus
:# vim /etc/hosts127.0.1.1 ubus:# hostnamectl set-hostname ubus -
Install SSHD - avoid python3 install through recommended packages
:# apt-get install openssh-server --no-install-recommends -
Install Docker
:# apt-get install --no-install-recommends docker.io docker-registry
:# systemctl enable docker
:# systemctl start docker
:# adduser devops docker
- Snapshot VM
:# shutdown -h now
-
Install Git
:# apt-get install --no-install-recommends git -
Install Postgresql Client
:# apt-get install --no-install-recommends postgresql-client -
Install DBD driver for PERL
:# apt-get install --no-install-recommends libdbd-pg-perl -
Pull sources from github
-- :$ git clone ssh://git@github.com:Aralin/devops.git:$ git clone https://github.com/Aralin/devops.git -
Start a database
;$ docker pull postgres:$ docker run --name qw-postgres -e POSTGRES_PASSWORD=postgres -d postgres:$ PG_CONTAINER_IP=$(docker inspect -f '{{ .NetworkSettings.IPAddress }}' qw-postgres):$ QW_DB=qw:question@${PG_CONTAINER_IP}:5432/qw -
Create the database
:$ cd ~/devops/qw/db/pg:$ PGPASSWORD=postgres psql -h $PG_CONTAINER -p 5432 -d postgres -U postgres create.sql -
Test database connection
:$ alias qw ~/devops/qw/bin/qw.pl:$ qw db now -
Create application schema
:$ qw db create -
Test command
:$ qw test Hello World