Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Jenkins ST #48

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
5 changes: 5 additions & 0 deletions jenkins/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### 2016-05-10

* Initial Jenkins Master / Slave import.
* Initial import of RL10 volume scripts.
* Initial import of generic CAT which will launch a master / slave cluster.
128 changes: 128 additions & 0 deletions jenkins/Jenkins-Master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
Name: Jenkins Master - Chef Solo (RightLink 10.6.0)
Description: "Chef Client ServerTemplate for RightLink10. RightLink10 is a new agent
to connect servers to the RightScale platform that is very lightweight and simple
to install.\n_It is not a plug-in upgrade from the older RightLink v6 series._\nSee
[http://docs.rightscale.com/rl/about.html](http://docs.rightscale.com/rl/about.html)
for details.\n\nThis base ST runs a script to update the packaging system and enable
automatic security updates, and a collectd install script to enable RightScale monitoring.
\n\nThe base ST can run on most any Linux distro that supports cloud-init. It is
recommended to use the standard distro images in various clouds.\n\n__Requirements__\n\n*
Chef Server or Hosted Chef\n\n__Tested Linux distros:__\n\n* Ubuntu 14.04 x86_64\n\n__Documenation__\n\n*
[Overview](http://docs.rightscale.com/st/rl10/chef-client/overview.html)\n\n\n__Tested
compute clouds:__\n\n* AWS\n"
Inputs:
COLLECTD_SERVER: env:RS_TSS
RS_INSTANCE_UUID: env:RS_INSTANCE_UUID
RightScripts:
Boot:
- RL10_Linux_Setup_Hostname.sh
- RL10_Linux_Enable_Managed_Login.sh
- RL10_Linux_Enable_Monitoring.sh
- RL10_Linux_Setup_Alerts.sh
- RL10_Linux_Setup_Automatic_Upgrade.sh
- RL5_6_10_Setup_Custom_Logrotate_Configs.sh
- Storage_Toolbox_Stripe-chef.sh
- RL10_Jenkins_Install_Master.sh
Decommission:
- RL10_Linux_Shutdown_Reason.sh
- Storage_Toolbox_Decommission-chef.sh
Operational:
- RL10_Linux_Setup_Automatic_Upgrade.sh
- RL10_Linux_Upgrade.sh
- Storage_Toolbox_Schedule-chef.sh
- Storage_Toolbox_Backup-chef.sh
MultiCloudImages:
- Name: Ubuntu_14.04_x64
Revision: 70
Publisher: RightScale
- Name: Ubuntu_12.04_x64
Revision: 66
Publisher: RightScale
- Name: Ubuntu_12.04_x64_KVM
Revision: 31
Publisher: RightScale
- Name: Ubuntu_14.04_x64_KVM
Revision: 31
Publisher: RightScale
- Name: Ubuntu_16.04_x64
Revision: 5
Publisher: RightScale
- Name: Ubuntu_16.04_x64_KVM
Revision: 3
Publisher: RightScale
- Name: CentOS_6.x_x64
Revision: 25
Publisher: RightScale
- Name: CentOS_6.x_x64_KVM
Revision: 30
Publisher: RightScale
- Name: CentOS_7.x_x64
Revision: 33
Publisher: RightScale
- Name: CentOS_7.x_x64_KVM
Revision: 30
Publisher: RightScale
- Name: RHEL_6.x_x64_KVM
Revision: 9
Publisher: RightScale
- Name: RHEL_7.x_x64_KVM
Revision: 9
Publisher: RightScale
- Name: RHEL_6.x_x64
Revision: 13
Publisher: RightScale
- Name: RHEL_7.x_x64
Revision: 11
Publisher: RightScale
Alerts:
- Name: rs instance terminated
Description: Raise an alert if the instance has been terminated abnormally, i.e.
not through the RightScale interface or by an elasticity daemon resizing server
arrays.
Clause: If RS/server.state == terminated for 1 minutes Then escalate critical
- Name: rs instance stranded
Description: Raise an alert if the instance enters the stranded state.
Clause: If RS/server-failure.state == stranded for 1 minutes Then escalate warning
- Name: rs instance not responding
Description: Raise an alert if the instance fails to send monitoring information
for 5 minutes.
Clause: If cpu-0/cpu-idle.value == NaN for 5 minutes Then escalate critical
- Name: rs cpu busy
Description: Raise an alert if the idle time is too low.
Clause: If cpu-0/cpu-idle.value < 15 for 3 minutes Then escalate warning
- Name: rs cpu overloaded
Description: Raise an alert when the cpu idle time is too low.
Clause: If cpu-0/cpu-idle.value < 3 for 5 minutes Then escalate critical
- Name: rs cpu I/O wait
Description: Raise an alert if disk io is too high.
Clause: If cpu-0/cpu-wait.value > 40 for 15 minutes Then escalate warning
- Name: rs low space in root partition
Description: Raise an alert if the available space in the root partition is too
low. This alert may be modified on an instance to match the metric name df/df-root.free
instead if the instance is running collectd 4. See the RL10 Linux Setup Alerts
RightScript (rll/setup-alerts.sh) for more details.
Clause: If df-root/df_complex-free.value < 1073741824 for 5 minutes Then escalate
critical
- Name: rs high network tx activity
Description: Raise an alert if the amount of network data transmitted is too high.
This alert may be modified or cloned on an instance to match the actual network
interfaces that are present. See the RL10 Linux Setup Alerts RightScript (rll/setup-alerts.sh)
for more details.
Clause: If interface-eth0/if_octets.tx > 10000000 for 10 minutes Then escalate critical
- Name: rs high network rx activity
Description: Raise an alert if the amount of network data received is too high.
This alert may be modified or cloned on an instance to match the actual network
interfaces that are present. See the RL10 Linux Setup Alerts RightScript (rll/setup-alerts.sh)
for more details.
Clause: If interface-eth0/if_octets.rx > 50000000 for 30 minutes Then escalate critical
- Name: rs low swap space
Description: Raise alert if the free swap space is too low. This alert may be removed
from an instance if swap is not enabled. See the RL10 Linux Setup Alerts RightScript
(rll/setup-alerts.sh) for more details.
Clause: If swap/swap-free.value < 104857600 for 5 minutes Then escalate critical
- Name: rs memory low
Description: Raise an alert if free memory is too low.
Clause: If memory/memory-free.value < 1000000 for 1 minutes Then escalate critical
- Name: rs out of memory
Description: Raise an alert when the server is out of free memory.
Clause: If memory/memory-free.value == 0 for 1 minutes Then escalate critical
128 changes: 128 additions & 0 deletions jenkins/Jenkins-Slave.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
Name: Jenkins Slave - Chef Solo (RightLink 10.6.0)
Description: "Chef Client ServerTemplate for RightLink10. RightLink10 is a new agent
to connect servers to the RightScale platform that is very lightweight and simple
to install.\n_It is not a plug-in upgrade from the older RightLink v6 series._\nSee
[http://docs.rightscale.com/rl/about.html](http://docs.rightscale.com/rl/about.html)
for details.\n\nThis base ST runs a script to update the packaging system and enable
automatic security updates, and a collectd install script to enable RightScale monitoring.
\n\nThe base ST can run on most any Linux distro that supports cloud-init. It is
recommended to use the standard distro images in various clouds.\n\n__Requirements__\n\n*
Chef Server or Hosted Chef\n\n__Tested Linux distros:__\n\n* Ubuntu 14.04 x86_64\n\n__Documenation__\n\n*
[Overview](http://docs.rightscale.com/st/rl10/chef-client/overview.html)\n\n\n__Tested
compute clouds:__\n\n* AWS\n"
Inputs:
COLLECTD_SERVER: env:RS_TSS
RS_INSTANCE_UUID: env:RS_INSTANCE_UUID
RightScripts:
Boot:
- RL10_Linux_Setup_Hostname.sh
rshade marked this conversation as resolved.
Show resolved Hide resolved
- RL10_Linux_Enable_Managed_Login.sh
- RL10_Linux_Enable_Monitoring.sh
- RL10_Linux_Setup_Alerts.sh
- RL10_Linux_Setup_Automatic_Upgrade.sh
- RL5_6_10_Setup_Custom_Logrotate_Configs.sh
- Storage_Toolbox_Stripe-chef.sh
- RL10_Jenkins_Install_Slave.sh
Decommission:
- RL10_Linux_Shutdown_Reason.sh
- Storage_Toolbox_Decommission-chef.sh
Operational:
- RL10_Linux_Setup_Automatic_Upgrade.sh
- RL10_Linux_Upgrade.sh
- Storage_Toolbox_Schedule-chef.sh
- Storage_Toolbox_Backup-chef.sh
MultiCloudImages:
- Name: Ubuntu_14.04_x64
Revision: 70
Publisher: RightScale
- Name: Ubuntu_12.04_x64
Revision: 66
Publisher: RightScale
- Name: Ubuntu_12.04_x64_KVM
Revision: 31
Publisher: RightScale
- Name: Ubuntu_14.04_x64_KVM
Revision: 31
Publisher: RightScale
- Name: Ubuntu_16.04_x64
Revision: 5
Publisher: RightScale
- Name: Ubuntu_16.04_x64_KVM
Revision: 3
Publisher: RightScale
- Name: CentOS_6.x_x64
Revision: 25
Publisher: RightScale
- Name: CentOS_6.x_x64_KVM
Revision: 30
Publisher: RightScale
- Name: CentOS_7.x_x64
Revision: 33
Publisher: RightScale
- Name: CentOS_7.x_x64_KVM
Revision: 30
Publisher: RightScale
- Name: RHEL_6.x_x64_KVM
Revision: 9
Publisher: RightScale
- Name: RHEL_7.x_x64_KVM
Revision: 9
Publisher: RightScale
- Name: RHEL_6.x_x64
Revision: 13
Publisher: RightScale
- Name: RHEL_7.x_x64
Revision: 11
Publisher: RightScale
Alerts:
- Name: rs instance terminated
Description: Raise an alert if the instance has been terminated abnormally, i.e.
not through the RightScale interface or by an elasticity daemon resizing server
arrays.
Clause: If RS/server.state == terminated for 1 minutes Then escalate critical
- Name: rs instance stranded
Description: Raise an alert if the instance enters the stranded state.
Clause: If RS/server-failure.state == stranded for 1 minutes Then escalate warning
- Name: rs instance not responding
Description: Raise an alert if the instance fails to send monitoring information
for 5 minutes.
Clause: If cpu-0/cpu-idle.value == NaN for 5 minutes Then escalate critical
- Name: rs cpu busy
Description: Raise an alert if the idle time is too low.
Clause: If cpu-0/cpu-idle.value < 15 for 3 minutes Then escalate warning
- Name: rs cpu overloaded
Description: Raise an alert when the cpu idle time is too low.
Clause: If cpu-0/cpu-idle.value < 3 for 5 minutes Then escalate critical
- Name: rs cpu I/O wait
Description: Raise an alert if disk io is too high.
Clause: If cpu-0/cpu-wait.value > 40 for 15 minutes Then escalate warning
- Name: rs low space in root partition
Description: Raise an alert if the available space in the root partition is too
low. This alert may be modified on an instance to match the metric name df/df-root.free
instead if the instance is running collectd 4. See the RL10 Linux Setup Alerts
RightScript (rll/setup-alerts.sh) for more details.
Clause: If df-root/df_complex-free.value < 1073741824 for 5 minutes Then escalate
critical
- Name: rs high network tx activity
Description: Raise an alert if the amount of network data transmitted is too high.
This alert may be modified or cloned on an instance to match the actual network
interfaces that are present. See the RL10 Linux Setup Alerts RightScript (rll/setup-alerts.sh)
for more details.
Clause: If interface-eth0/if_octets.tx > 10000000 for 10 minutes Then escalate critical
- Name: rs high network rx activity
Description: Raise an alert if the amount of network data received is too high.
This alert may be modified or cloned on an instance to match the actual network
interfaces that are present. See the RL10 Linux Setup Alerts RightScript (rll/setup-alerts.sh)
for more details.
Clause: If interface-eth0/if_octets.rx > 50000000 for 30 minutes Then escalate critical
- Name: rs low swap space
Description: Raise alert if the free swap space is too low. This alert may be removed
from an instance if swap is not enabled. See the RL10 Linux Setup Alerts RightScript
(rll/setup-alerts.sh) for more details.
Clause: If swap/swap-free.value < 104857600 for 5 minutes Then escalate critical
- Name: rs memory low
Description: Raise an alert if free memory is too low.
Clause: If memory/memory-free.value < 1000000 for 1 minutes Then escalate critical
- Name: rs out of memory
Description: Raise an alert when the server is out of free memory.
Clause: If memory/memory-free.value == 0 for 1 minutes Then escalate critical
43 changes: 43 additions & 0 deletions jenkins/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
### README:

* Upload YAML files to your account with [right_st](https://github.com/rightscale/right_st)

### IMPORTANT INPUTS:

#### Jenkins Related:

* `MASTER_IP`: Reachable address for the Jenkins slaves to contact and add themselves to the cluster. Usually the private IP address of the Jenkins Master host.

* `SWARM_PLUGIN_VERSION`: Version of the Jenkins Swarm plugin to install which allows for slave / master discovery. Currently defaults to `3.4`.

* `DESCRIPTION`: Text name of jenkins slave instances.

* `AUTO_DISCOVERY_ADDRESS`: Enable this if using UDP based discovery. Not required. Current defaults allow Jenkins slaves to discover master via Swarm plugin and connecting to `MASTER_IP`.

* `MASTER_PORT`: Default port Jenkins listens on. Defaults to `8080`.

#### Storage Related:

* `BACKUP_KEEP_DAILIES`: Number of daily backups to keep. Defaults to `14`.

* `BACKUP_KEEP_LAST`: Number of snapshots to keep. Defaults to `60`.

* `BACKUP_KEEP_MONTHLIES`: Number of monthly backups to keep. Defaults to `12`.

* `BACKUP_KEEP_WEEKLIES`: Number of weekly backups to keep. Defaults to `6`.

* `BACKUP_KEEP_YEARLIES`: Number of yearly backups to keep. Defaults to `2`.

* `STOR_BACKUP_LINEAGE`: Name of backup lineage to use for snapshots.

* `DEVICE_MOUNT_POINT`: Mount point of data volume. Defaults to `/var/lib/jenkins`, which is the Jenkins home / work directory.

* `DEVICE_NICKNAME`: Name of the LVM device to be created. Defaults to `data_storage`.

* `DEVICE_COUNT`: Number of devices to create which will make up the underlying LVM volume.

* `DEVICE_DESTROY_ON_DECOMMISSION`: If set to true, the devices will be destroyed on decommission. Defaults to `false`.

* `STOR_RESTORE_LINEAGE`: If set, restore from the supplied backup name.

* `STOR_RESTORE_TIMESTAMP`: The filesystem to be used on the data volume. Defaults to `ext4`.
Loading