Skip to content
This repository was archived by the owner on Nov 6, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions dirsrv-389ds/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*.{yaml,json,xml,html}]
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

[*.{java,groovy}]
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true
24 changes: 24 additions & 0 deletions dirsrv-389ds/ReadMe.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
== 389ds - Directory Server

This deploys the http://directory.fedoraproject.org/[389ds] to the Kubernetes or OpenShift

=== Deploying to kubernetes

To deploy the application to kubernetes using the command from http://fabric8.io/manifests/kubernetes.html and
selecting the version of the dirsrv-389ds app from the list


=== Deploying to OpenShift


IMPORTANT: When deploying in the OpenShift, the project to which the application will be deployed needs to have the
policy added like `oc adm policy add-scc-to-user anyuid system:serviceaccount:<project>:dirsrv-389ds`

To deploy the application to OpenShift using the command from http://fabric8.io/manifests/openshift.html and
selecting the version of the 389ds app from the list

NOTE: The OpenShift right now allows accessing the LDAP server using NodePort only, as the OpenShift router
needs SNI + other things to do ldap transport



65 changes: 65 additions & 0 deletions dirsrv-389ds/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2005-2017 Red Hat, Inc.

Red Hat licenses this file to you under the Apache License, version
2.0 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.fabric8.devops.apps</groupId>
<artifactId>fabric8-devops</artifactId>
<version>2.2-SNAPSHOT</version>
</parent>

<artifactId>389ds</artifactId>
<version>0.1-SNAPSHOT</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its probably better to use the same version as the rest of the modules to avoid confusion

if you want to version this package independently then spin it out into a separate git repo like kubeflix etc?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean use 2.2-SNAPSHOT? Actually that will be bit confusing as we suddenly bump the project to 2.2.x for its first release ;) .. I will then model it like kubeflix, as usual will create the project repo, you can clone it and under fabric8io


<name>389ds::Directory Sever</name>
<description>
[389ds](http://directory.fedoraproject.org/) 389 Directory Server
</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<docker.image>fabric8/389ds</docker.image>
</properties>

<build>
<finalName>dirsrv-389ds</finalName>
<resources>
<resource>
<directory>src/main/fabric8</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${fabric8.maven.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>resource</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
8 changes: 8 additions & 0 deletions dirsrv-389ds/src/main/fabric8/dirsrv-389ds-cm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: "v1"
data:
dirsrv-hostname: ""
dirsrv-suffix: "dc=example,dc=com"
metadata:
name: "dirsrv-389ds"
kind: "ConfigMap"
labels: {}
39 changes: 39 additions & 0 deletions dirsrv-389ds/src/main/fabric8/dirsrv-389ds-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
spec:
replicas: 1
template:
spec:
containers:
- env:
- name: "DIRSRV_HOSTNAME"
valueFrom:
configMapKeyRef:
key: "dirsrv-hostname"
name: "dirsrv-389ds"
- name: "DIRSRV_ADMIN_USERNAME"
valueFrom:
secretKeyRef:
key: "dirsrvAdminUserName"
name: "dirsrv-389ds"
- name: "DIRSRV_ADMIN_PASSWORD"
valueFrom:
secretKeyRef:
key: "dirsrvAdminUserPassword"
name: "dirsrv-389ds"
- name: "DIRSRV_MANAGER_PASSWORD"
valueFrom:
secretKeyRef:
key: "dirsrvManagerPassword"
name: "dirsrv-389ds"
- name: "DIRSRV_SUFFIX"
valueFrom:
configMapKeyRef:
key: "dirsrv-suffix"
name: "dirsrv-389ds"
image: "${docker.image}"
imagePullPolicy: "IfNotPresent"
name: "dirsrv-389ds"
ports:
- containerPort: 389
name: "ldap"
serviceAccountName: "dirsrv-389ds"
5 changes: 5 additions & 0 deletions dirsrv-389ds/src/main/fabric8/dirsrv-389ds-sa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: "v1"
kind: "ServiceAccount"
metadata:
name: "dirsrv-389ds"
8 changes: 8 additions & 0 deletions dirsrv-389ds/src/main/fabric8/dirsrv-389ds-secret.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: "v1"
kind: "Secret"
metadata:
name: "dirsrv-389ds"
data:
dirsrvAdminUserName: YWRtaW4K
dirsrvAdminUserPassword: YWRtaW5AMTIzCg==
dirsrvManagerPassword: YWRtaW5AMTIzCg==
13 changes: 13 additions & 0 deletions dirsrv-389ds/src/main/fabric8/dirsrv-389ds-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: "v1"
kind: "Service"
metadata:
labels:
expose: true
name: "dirsrv-389ds"
spec:
type: NodePort
ports:
- port: 389
protocol: "TCP"
targetPort: 389
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
<configmapcontroller.version>2.3.5</configmapcontroller.version>
<exposecontroller.version>2.3.6</exposecontroller.version>
<jenkins-openshift.version>v14e753c</jenkins-openshift.version>
<dirsrv-389ds.version>0.1.1</dirsrv-389ds.version>
</properties>

<distributionManagement>
Expand Down Expand Up @@ -167,6 +168,7 @@
<module>collector-utils</module>
<module>configmapcontroller</module>
<module>content-repository</module>
<module>dirsrv-389ds</module>
<module>elasticsearch</module>
<module>exposecontroller</module>
<module>fabric8-docker-registry</module>
Expand Down