Commit 8d648ce3 authored by Reimar Stier's avatar Reimar Stier

Add quickstart guide

parent dffa4b0d
# Prerequisites # Documentation Reference
choco install vagrant This repository contains information on setting up your developer machine quickly.
vagrant plugin install vagrant-disksize On Windows it uses the package manager chocolatey.
vagrant plugin install vagrant-proxyconf On Linux there is a configuration with vagrant and ansible booting a basic setup on basis of Debian.
# Debug playbook There is more documentation on customization (other base images and more), see folder `doc`.
* in vagrant box
# Quickstart
Just get me started ...
* Ensure execution policy is at least `RemoteSigned`
``` ```
vagrant ssh devbox Get-ExecutionPolicy
cd /vagrant
ansible-playbook playbook.yml --connection=local -i devbox, -e ansible_become=true
``` ```
* From controlling host * Install chocolatey behind proxy
`ANSIBLE_TAGS=partition vagrant provision`
# SSH configuration
Provision own ssh key to the vagrant box. Compare [documentation|https://www.vagrantup.com/docs/vagrantfile/ssh_settings.html]
`config.ssh.insert_key=True`
Vagrant adds its own private/public key pair to the box. Private key will be stored on the executing box in $(pwd)/.vagrant folder.
``` ```
vagrant provision devbox --provision-with shell [System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
``` ```
* Enable chocolatey's feature auto confirmation
```
choco feature enable -n allowGlobalConfirmation
```
* Install git + firefox
```
choco install firefox git
```
* Get Daimler certificate authority (CA) from stash.detss.corpintra.net (export certificate chain in pem format)
* Configure git to use the Daimler CA
```
git config --global http.sslCAInfo C:\documents\stash.pem
```
* Install vagrant, virtualbox and optionally some desktop packages
```
choco install windows\packages\virtualization.config
choco install windows\packages\desktop.config
```
* Configure squid proxy on windows host and change username in configuration file
# Graphics card issues Copy files\squid.conf C:\Squid\etc\squid\squid.conf
Issues with nvidia graphics card (NVIDIA Corporation GK106GLM [Quadro K2100M]).
* Use latest virtualbox / vagrant
* Use proprietary nvidia driver if nvidia graphics card present
* Enable 3d acceleration
* Use xfce4-session instead of gnome-session
# base boxes
* geerlingguy https://app.vagrantup.com/geerlingguy
* gerlingguy/debian10 (https://github.com/geerlingguy/packer-debian-10)
* Ubuntu https://app.vagrantup.com/ubuntu/
* ubuntu/bionic64 (Ubuntu 18.04)
* Generic https://app.vagrantup.com/generic/ * Start VM
* Roboxes (https://roboxes.org/) is a project that encapsulates Packer templates for building base boxes suitable for use with Vagrant, Docker, or as generic open virtualization appliances. A subset of the templates are built and available from the Vagrant Cloud. ```
* generic/ubuntu1804 vagrant up
* generic/debian10 ```
* generic/opensuse15
* generic/centos8
* Opensuse
* opensuse/openSUSE-Tumbleweed-Vagrant.x86_64
# Prerequisites
choco install vagrant
vagrant plugin install vagrant-disksize
vagrant plugin install vagrant-proxyconf
# Debug playbook
* in vagrant box
```
vagrant ssh devbox
cd /vagrant
ansible-playbook playbook.yml --connection=local -i devbox, -e ansible_become=true
```
* From controlling host
`ANSIBLE_TAGS=partition vagrant provision`
# SSH configuration
Provision own ssh key to the vagrant box. Compare [documentation|https://www.vagrantup.com/docs/vagrantfile/ssh_settings.html]
`config.ssh.insert_key=True`
Vagrant adds its own private/public key pair to the box. Private key will be stored on the executing box in $(pwd)/.vagrant folder.
```
vagrant provision devbox --provision-with shell
```
# Graphics card issues
Issues with nvidia graphics card (NVIDIA Corporation GK106GLM [Quadro K2100M]).
* Use latest virtualbox / vagrant
* Use proprietary nvidia driver if nvidia graphics card present
* Enable 3d acceleration
* Use xfce4-session instead of gnome-session
# base boxes
* geerlingguy https://app.vagrantup.com/geerlingguy
* gerlingguy/debian10 (https://github.com/geerlingguy/packer-debian-10)
* Ubuntu https://app.vagrantup.com/ubuntu/
* ubuntu/bionic64 (Ubuntu 18.04)
* Generic https://app.vagrantup.com/generic/
* Roboxes (https://roboxes.org/) is a project that encapsulates Packer templates for building base boxes suitable for use with Vagrant, Docker, or as generic open virtualization appliances. A subset of the templates are built and available from the Vagrant Cloud.
* generic/ubuntu1804
* generic/debian10
* generic/opensuse15
* generic/centos8
* Opensuse
* opensuse/openSUSE-Tumbleweed-Vagrant.x86_64
# port definitions
acl SSL_ports port 443
acl SSL_ports port 9200 # elasticsearch
acl SSL_ports port 6443 # kubernetes apiserver
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
# network subnet origin/source definitions
acl docker src 172.16.0.0/12
acl vagrant src 192.168.200.0/24
acl vms src 192.168.56.0/24
# network subnet destination definitions
acl daimler_target dst 53.0.0.0/8
acl flannel_target dst 10.0.0.0/8
acl docker_target dst 172.16.0.0/12
# bypass proxy for local domains, local subnet
acl corp-servers dstdomain .corpintra.net
acl tss-servers dstdomain .daimler-tss.de
always_direct allow corp-servers
always_direct allow tss-servers
acl local-servers dstdomain .local
always_direct allow local-servers
always_direct allow daimler_target
always_direct allow docker_target
cache deny all
# generic access restrictions
http_access deny !Safe_ports
# http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
# allow http access originating from these subnets
http_access allow localhost
http_access allow vagrant
http_access allow vms
# deny http access for the rest
http_access deny all
# listen on following port
http_port 3128
# all other queries are handled directly by squid
never_direct allow all
# proxy parent
#cache_peer 53.48.15.138 parent 3128 0 no-query no-digest no-netdb-exchange login=USERNAME:PASSWORD
#cache_peer s415078c.detss.corpintra.net parent 3128 0 no-query no-digest no-netdb-exchange login=USERNAME:PASSWORD
# access_log none
#access_log stdio
#access_log stdio:/var/log/squid/access.log squid
...@@ -2,4 +2,5 @@ ...@@ -2,4 +2,5 @@
<packages> <packages>
<package id="vagrant" /> <package id="vagrant" />
<package id="virtualbox" /> <package id="virtualbox" />
<package id="squid" comment="HTTP Proxy"/>
</packages> </packages>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment