Allow auth on jenkins, split slave system

Change-Id: I35416dcd6baaa0159f2191be9b4029228545aa53
diff --git a/jenkins/slave/docker.yml b/jenkins/slave/docker.yml
new file mode 100644
index 0000000..b134225
--- /dev/null
+++ b/jenkins/slave/docker.yml
@@ -0,0 +1,9 @@
+classes:
+  - system.jenkins.slave
+parameters:
+  linux:
+    system:
+      user:
+        jenkins:
+          groups:
+            - docker
diff --git a/jenkins/slave/init.yml b/jenkins/slave/init.yml
new file mode 100644
index 0000000..c445c14
--- /dev/null
+++ b/jenkins/slave/init.yml
@@ -0,0 +1,37 @@
+applications:
+  - jenkins
+classes:
+  - service.java.environment
+parameters:
+  _param:
+    java_environment_version: "8"
+    java_environment_platform: openjdk
+    jenkins_slave_user: none
+    jenkins_slave_password: none
+    jenkins_master_host: ${_param:control_vip_address}
+    jenkins_master_port: 8081
+    jenkins_master_protocol: http
+  java:
+    environment:
+      headless: true
+  jenkins:
+    slave:
+      enabled: true
+      pkgs: false
+      sudo: false
+      scripts: []
+      master:
+        host: ${_param:jenkins_master_host}
+        port: ${_param:jenkins_master_port}
+        protocol: ${_param:jenkins_master_protocol}
+      user:
+        name: ${_param:jenkins_slave_user}
+        password: ${_param:jenkins_slave_password}
+  linux:
+    system:
+      user:
+        jenkins:
+          enabled: true
+          name: jenkins
+          home: /var/lib/jenkins
+          sudo: false
diff --git a/jenkins/slave/libvirt.yml b/jenkins/slave/libvirt.yml
new file mode 100644
index 0000000..e40b841
--- /dev/null
+++ b/jenkins/slave/libvirt.yml
@@ -0,0 +1,25 @@
+classes:
+  - system.jenkins.slave
+  - service.iptables.server
+parameters:
+  linux:
+    system:
+      user:
+        jenkins:
+          groups:
+            - kvm
+            - libvirtd
+      package:
+        qemu:
+          version: latest
+        libvirt-bin:
+          version: latest
+  # Ensure FORWARD chain to be ACCEPT to avoid issue when running with docker
+  # 1.13 and newer that sets chain to DROP, see:
+  #   https://github.com/docker/docker/pull/28257
+  iptables:
+    service:
+      enabled: true
+      chain:
+        FORWARD:
+          policy: ACCEPT