This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from IBM/containerized-ubiquity
Containerize ubiquity server
- Loading branch information
Showing
28 changed files
with
927 additions
and
891 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
language: go | ||
|
||
go: | ||
- 1.7 | ||
- 1.9 | ||
|
||
install: | ||
- sh scripts/run_glide_up | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM golang:1.9.0 | ||
WORKDIR /go/src/github.com/IBM/ubiquity/ | ||
COPY . . | ||
RUN go get -v github.com/Masterminds/glide | ||
RUN glide up | ||
RUN CGO_ENABLED=1 GOOS=linux go build -tags netgo -v -a --ldflags '-w -linkmode external -extldflags "-static"' -installsuffix cgo -o ubiquity main.go | ||
|
||
|
||
FROM alpine:latest | ||
RUN apk --no-cache add ca-certificates | ||
WORKDIR /root/ | ||
COPY --from=0 /go/src/github.com/IBM/ubiquity/ubiquity . | ||
CMD ["./ubiquity"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"kind": "Service", | ||
"apiVersion": "v1", | ||
"metadata": { | ||
"name": "pgset-master", | ||
"labels": { | ||
"name": "pgset-master" | ||
} | ||
}, | ||
"spec": { | ||
"ports": [{ | ||
"protocol": "TCP", | ||
"port": 5432, | ||
"targetPort": 5432, | ||
"nodePort": 0 | ||
}], | ||
"selector": { | ||
"name": "pgset-master" | ||
}, | ||
"type": "ClusterIP", | ||
"sessionAffinity": "None" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"kind": "Service", | ||
"apiVersion": "v1", | ||
"metadata": { | ||
"name": "pgset-replica", | ||
"labels": { | ||
"name": "pgset-replica" | ||
} | ||
}, | ||
"spec": { | ||
"ports": [{ | ||
"protocol": "TCP", | ||
"port": 5432, | ||
"targetPort": 5432, | ||
"nodePort": 0 | ||
}], | ||
"selector": { | ||
"name": "pgset-replica" | ||
}, | ||
"type": "ClusterIP", | ||
"sessionAffinity": "None" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"apiVersion": "v1", | ||
"kind": "Service", | ||
"metadata": { | ||
"name": "pgset", | ||
"labels": { | ||
"app": "pgset" | ||
} | ||
}, | ||
"spec": { | ||
"ports": [ | ||
{ | ||
"port": 5432, | ||
"name": "web" | ||
} | ||
], | ||
"clusterIP": "None", | ||
"selector": { | ||
"app": "pgset" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"apiVersion": "v1", | ||
"kind": "ServiceAccount", | ||
"metadata": { | ||
"name": "pgset-sa" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
"apiVersion": "apps/v1beta1", | ||
"kind": "StatefulSet", | ||
"metadata": { | ||
"name": "pgset" | ||
}, | ||
"spec": { | ||
"serviceName": "pgset", | ||
"replicas": 1, | ||
"template": { | ||
"metadata": { | ||
"labels": { | ||
"app": "pgset", | ||
"name": "pgset-replica" | ||
} | ||
}, | ||
"spec": { | ||
"serviceAccount": "pgset-sa", | ||
"securityContext": { | ||
"fsGroup": 26 | ||
}, | ||
"containers": [{ | ||
"name": "pgset", | ||
"image": "crunchydata/crunchy-postgres:centos7-9.6-1.5.1", | ||
"ports": [{ | ||
"containerPort": 5432, | ||
"name": "postgres" | ||
}], | ||
"env": [{ | ||
"name": "PG_MASTER_USER", | ||
"value": "master" | ||
}, { | ||
"name": "PGHOST", | ||
"value": "/tmp" | ||
}, { | ||
"name": "PG_MODE", | ||
"value": "set" | ||
}, { | ||
"name": "PG_MASTER_HOST", | ||
"value": "pgset-master" | ||
}, { | ||
"name": "PG_MASTER_PORT", | ||
"value": "5432" | ||
}, { | ||
"name": "PG_MASTER_PASSWORD", | ||
"value": "password" | ||
}, { | ||
"name": "PG_USER", | ||
"value": "testuser" | ||
}, { | ||
"name": "PG_PASSWORD", | ||
"value": "password" | ||
}, { | ||
"name": "PG_DATABASE", | ||
"value": "userdb" | ||
}, { | ||
"name": "PG_ROOT_PASSWORD", | ||
"value": "password" | ||
}], | ||
"volumeMounts": [{ | ||
"name": "pgdata", | ||
"mountPath": "/pgdata", | ||
"readOnly": false | ||
}] | ||
}], | ||
"volumes": [{ | ||
"name": "pgdata", | ||
"persistentVolumeClaim": { | ||
"claimName": "ibm-ubiquity-database" | ||
} | ||
}] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: "extensions/v1beta1" | ||
kind: Deployment | ||
metadata: | ||
name: ubiquity | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: ubiquity | ||
spec: | ||
containers: | ||
- name: ubiquity | ||
image: IBMubiquityIMAGE # place holder | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 9999 | ||
name: ubiquity-port | ||
env: | ||
- name: PORT # Ubiquity port | ||
value: "9999" | ||
- name: LOG_PATH # Ubiquity log file directory | ||
value: "/tmp" | ||
- name: DEFAULT_BACKEND | ||
value: "scbe" | ||
- name: LOG_LEVEL # debug / info / error | ||
value: "info" | ||
- name: SCBE_DEFAULT_SERVICE | ||
value: "gold" | ||
- name: DEFAULT_VOLUME_SIZE | ||
value: "2" | ||
- name: UBIQUITY_INSTANCE_NAME | ||
value: "instance1" | ||
- name: DEFAULT_FSTYPE | ||
value: "ext4" | ||
- name: SCBE_MANAGEMENT_IP | ||
value: "IP" | ||
- name: SCBE_MANAGEMENT_PORT | ||
value: "8440" | ||
- name: SKIP_VERIFY_SSL | ||
value: "true" | ||
- name: SCBE_USERNAME | ||
value: "USER" | ||
- name: SCBE_PASSWORD | ||
value: "PASSWORD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: ubiquity | ||
labels: | ||
app: ubiquity | ||
spec: | ||
ports: | ||
- port: 9999 | ||
protocol: TCP | ||
targetPort: 9999 | ||
type: LoadBalancer | ||
selector: | ||
app: ubiquity | ||
--- | ||
apiVersion: "extensions/v1beta1" | ||
kind: Deployment | ||
metadata: | ||
name: ubiquity | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: ubiquity | ||
spec: | ||
containers: | ||
- name: ubiquity | ||
image: IBMubiquityIMAGE # place holder | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 9999 | ||
name: ubiquity-port | ||
env: | ||
- name: PORT # Ubiquity port | ||
value: "9999" | ||
- name: LOG_PATH # Ubiquity log file directory | ||
value: "/tmp" | ||
- name: CONFIG_PATH # Ubiquity config directory | ||
value: "/tmp/ubiquity" | ||
- name: DEFAULT_BACKEND # or other backends, such as :scbe, spectrum-scale-nfs | ||
value: "spectrum-scale" | ||
- name: LOG_LEVEL # debug / info / error | ||
value: "info" | ||
- name: DEFAULT_FILESYSTEM_NAME | ||
value: "gold" | ||
#This variable is needed just in case of spectrum scale nfs backend | ||
- name: SSC_NFS_SERVER_ADDRESS | ||
value: "127.0.0.1" | ||
#The SSC_SSH_* variables are needed in cas of using ssh with spectrum scale | ||
- name: SSC_SSH_HOST | ||
value: "192.168.10.10" | ||
- name: SSC_SSH_PORT | ||
value: "22" | ||
- name: SSC_SSH_USER | ||
value: "ubiquity" | ||
- name: FORCE_DELETE | ||
value: "false" | ||
# The following variables are specific to SCBE | ||
- name: SCBE_DEFAULT_SERVICE | ||
value: "gold" | ||
- name: "DEFAULT_VOLUME_SIZE" | ||
value: "2" | ||
- name: UBIQUITY_INSTANCE_NAME | ||
value: "instance1" | ||
- name: DEFAULT_FSTYPE | ||
value: "ext4" | ||
- name: SCBE_MANAGEMENT_IP | ||
value: "127.0.0.1" | ||
- name: SCBE_MANAGEMENT_PORT | ||
value: "8440" | ||
- name: SKIP_VERIFY_SSL | ||
value: "true" | ||
- name: SCBE_USERNAME | ||
value: "USER" | ||
- name: SCBE_PASSWORD | ||
value: "PASSWORD" | ||
#This volume is needed just for spectrum scale backend | ||
volumeMounts: | ||
- name: ssc | ||
mountPath: /usr/lpp | ||
volumes: | ||
- name: ssc | ||
hostPath: | ||
path: /usr/lpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: ubiquity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: ubiquity | ||
labels: | ||
app: ubiquity | ||
spec: | ||
ports: | ||
- port: 9999 | ||
protocol: TCP | ||
targetPort: 9999 | ||
type: LoadBalancer | ||
selector: | ||
app: ubiquity |
Oops, something went wrong.