Blog Marcina Bojko

Linux,Windows,serwer, i tak dalej ;)

Posts Tagged ‘open source

Hyper-V Packer Gen2 machines – version 1.0.5

leave a comment »

https://github.com/marcinbojko/hv-packer

 

Written by marcinbojko

Październik 3, 2018 at 20:02

Napisane w work

Tagged with , , , ,

Simple Foreman Template (with Grafana Dashboard) for Zabbix 3.x

Small project, using trappers instead of zabbix-agent active mode. I wanted to have better control over the pushing layer and intervals.

https://github.com/marcinbojko/foreman-template

Written by marcinbojko

Kwiecień 24, 2018 at 18:15

Hyper-V Packer Gen2 machines – version 1.0.3

The most „bad ass” release so far 🙂

  • * `BREAKING FEATURE` – preparing switching to submodules/subtree for ./scripts and ./files – to share common code with other providers
  • * tree structure in `./scripts` and `./files`, moved to `./extras`
  • * [Windows] adding `phase-3.ps1` script to put less generic stuff there. Just uncomment line with `exit` to get rid of it
  • * [Windows] added support for `Windows Server 1709 Edition (Standard)`
  • * [Windows] remove some clutter from `bootstrap.ps1`
  • * [Windows] added `exit 0` for most of the scripts as some external commands were leaving packer with non-zero exit codes
  • * [CentOS] added `zeroing.sh` script to make compacting more efficient
  • * [CentOS] reworked bug with UEFI – this time after deploying from image you can run script `/usr/local/bin/uefi.sh` which will recheck and readd CentOS UEFI entries. For SCVMM deployments (which separates vhdx from vmcx) use `RunOnce`
  • * [CentOS] removed clutter from `provision.sh`
  • * [CentOS] removed screenfetch, replaced with neofetch
  • * [CentOS] reworked `motd.sh` in `/etc/profile.d` to reflect .Xauthority existence*

https://github.com/marcinbojko/hv-packer

Written by marcinbojko

Luty 23, 2018 at 19:34

Napisane w work

Tagged with , , , , ,

Quick Zabbix (agent/server) migration from 2.2/3.0 to 3.2 (installed from official repository)

  1. Backup your machine (physical/virtual)
  2. Run (for server AND agent)

    # stop services
    systemctl stop zabbix-server
    systemctl stop zabbix-agent
    
    # clean cache
    yum clean all
    
    # upgrade releases from 2.x/3.0 to 3.2
    yum upgrade http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
    
    # disable additional repository
    yum-config-manager --disable zabbix-non-supported
    
    # update
    yum update -y
    
    # clean cache
    yum clean all
    
    # enable services
    systemctl enable zabbix-server
    systemctl enable zabbix-agent

  3. [FOR AGENTS ONLY] Run:

    # for agents
    
    systemctl stop zabbix-agent
    
    yum clean all
    
    yum upgrade http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
    
    yum-config-manager --disable zabbix-non-supported
    
    yum install zabbix-agent -y
    
    yum clean all
    
    systemctl enable zabbix-agent
    
    systemctl start zabbix-agent

Written by marcinbojko

Październik 15, 2016 at 14:21

HV-Default – confirmed working with Hyper-V 2016

New version available:

https://github.com/marcinbojko/hv_default

Written by marcinbojko

Październik 13, 2016 at 18:36

Napisane w Uncategorized, work

Tagged with , ,

Puppet & The Foreman & Powershell DSC – Windows Updates: Neverending story.

Nobody likes Windows Updates even Microsoft itself. But sometimes one should make sure, you have perks your system needs. But, we co do it old fashion way: check, update, reboot, repeat. Boring, and completly not in a way DevOps do.

Again, Win_manage to the rescue.

First we make sure what we want to do:

dsc_xwindowsupdateagent_schedule

first:
  dsc_dayofweek: sunday
  dsc_afterhour: 11
  dsc_usenotify: true


dsc_xwindowsupdateagent

security:
  dsc_updatenow: 'true'
  dsc_category: security
important:
  dsc_updatenow: 'true'
  dsc_category: important
optional:
  dsc_updatenow: 'true'
  dsc_category: optional

dsc_reboot

dsc_reboot:
  message: Machine requested a reboot
  when: pending

But what does it do? First, we should prepare update schedule: let’s say, we can start auto-updates on Sunday, after 11 AM (remember 11 AM = 11:00, and 11:00 PM=23:00)

Second: we want to install 3 type of updates: security, important and optional.

Third: we want to auto-reboot our machine (dsc_reboot) and notify us about pending updates count BEFORE and AFTER update patch set (dsc_usenotify: true)

So, we can switch from:

selection_426

to

selection_427

in a time needed to get some music 🙂

Written by marcinbojko

Październik 9, 2016 at 18:36

Puppet & The Foreman & Powershell DSC – The Road So Far.

During last few weeks I was able to push and heavy test puppet-dsc code in a lots of environments and setups.

We had sysprepped Windows Server 2012 R2 images (different versions, builds and setups), a lots of Windows 10 Professional Workstations (Original, 1511, 1607 builds), few Windows 8.1 Pro – really great statistic sample.

As for now:

  • Windows Server 2012 and Windows 2012 R2 – fully supported
  • Windows 8.1/10 (original)/10 (1511) – fully supported
  • Windows Server 2016/Windows 10 (1607) – unsupported due to parsing bug in Powershell 5.1 – Work in progress
  • Windows 7/8 – not tested
  • Windows 2008 R2 – not tested

Implemented modules:

  • Chocolatey – with features and sources support (adding, removing, modyfing)
  • DSC_WindowsFeature
  • DSC_WindowsOptionalFeature
  • DSC_Service
  • DSC_Environment
  • DSC_Group
  • DSC_xFirewall
  • DSC_Reboot

More code is coming, but this fine set allows you to deploy and manage a lots of types of servers and workstations.

Written by marcinbojko

Październik 7, 2016 at 19:47

%d blogerów lubi to: