rasti.hil@hilandco.com +41 79 367-9677

Install AWX

yum install -y git

mkdir ansible
cd ansible/
export http_proxy=http://<proxy>:3128
export https_proxy=http://<proxy>:3128
export HTTP_PROXY=http://<proxy>:3128
export HTTPS_PROXY=http://<proxy>:3128
git clone https://github.com/ansible/awx.git
cd awx/installer/

yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y ansible
yum install -y python-pip python-devel gcc
pip install --upgrade pip

pip uninstall docker docker-py docker-compose
pip install docker-compose

ansible-playbook -i inventory install.yml

URL

http://<awx_server>/#/home

Rest API Call


http://<awx_server>/api/v2/job_templates/33/launch/

Launching from Job Templates via the API follows the following workflow:
GET https://your.tower.server/api/v2/job_templates/&lt;your job template id>/launch/

Chocolatey Windows package management


Install Chocolatey

cmd as Admin
@powershell -NoProfile -ExecutionPolicy Unrestricted -Command "[Net.WebRequest]::DefaultWebProxy.Credentials = [Net.CredentialCache]::DefaultCredentials; iex ((New-Object Net.WebClient).DownloadString('https://chocolatey.org/install.ps1’))” && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

OR

cmd as Admin
@powershell -NoProfile Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Install Apps


Cmd as Admin

Default

choco install -y notepadplusplus
choco install -y googlechrome
choco install -y firefox
choco install -y adobereader
choco install -y totalcommander
choco install -y irfanview
choco install 7zip -y
choco install sysinternals -y

Development 


choco install -y vscode
choco install -y svn
choco install -y virtualboxchoco install -y vagrant
choco install keepass -y
choco install curl -y
choco install git -y
choco install postman -y
choco install fiddler -y
choco install terraform -y
choco install git.install -y

Mircosoft


choco install Office365ProPlus -y
choco install microsoft-teams -y
choco install skype -y
choco install powerbi -y

Azure

choco install azure-cli -y
choco install azcopy -y
choco install azure-data-studio -y

Server Software

choco install nodejs -y





choco install elasticsearch -y

Proxy

cntlm -u <user>@<domain> -H

Upgrading software

choco upgrade <packagename>.

mklink /D azure "G:\My Drive\azure"







Install Portainer

docker volume create portainer_data
docker run -d -p 9000:9000 -p 8000:8000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

in case of proxy restriction


docker run -d -p 9000:9000 -p 8000:8000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer --env HTTPS_PROXY="http://localhost:3129" --env HTTP_PROXY="http://localhost:3129"

How to install Docker CE (community edition): on RHEL 7

install steps

yum remove docker docker-common docker-selinux docker-engine
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-3.el7.noarch.rpm
yum install docker-ce
groupadd docker
usermod -aG docker $USER
systemctl enable docker
systemctl start docker

install docker-compose

yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y python-pip python-devel gcc
pip install --upgrade pip
pip uninstall docker docker-py docker-compose
pip install docker-compose


test docker 

docker run hello-world

in case of update 

cd /var/lib/docker/containers
sed -i "s/docker-runc//g"  $(grep  -rl "docker-run")
systemctl restart docker

in case of conflict with existing network

vi /etc/docker/daemon.json
{
"data-root": "/data01/docker/",
 "bip": "192.168.200.5/24",
"default-address-pools": [ {"base":"192.168.201.0/24","size":28} ],
"insecure-registries":["host1:5000"] 
}

systemctl daemon-reload
systemctl restart docker


in case of proxy restriction

mkdir -p /etc/systemd/system/docker.service.d

vi /etc/systemd/system/docker.service.d/http-proxy.conf

[Service]
Environment="HTTP_PROXY=http://localhost:3129/"
Environment="HTTPS_PROXY=http://localhost:3129/"
Environment="NO_PROXY=localhost,127.0.0.1,172.17.0.1,172.30.1.1,host01"

systemctl daemon-reload
systemctl restart docker

 How do I enable the remote API for dockerd


vi /etc/systemd/system/docker.service.d/startup_options.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376

systemctl daemon-reload
systemctl restart docker.service