Skip to content

Commit d1ebfd5

Browse files
author
Prakash Surya
committed
Delphix Platform - Initial Commit
0 parents  commit d1ebfd5

File tree

33 files changed

+1200
-0
lines changed

33 files changed

+1200
-0
lines changed

.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# Copyright 2018 Delphix
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
debian/.debhelper
18+
debian/changelog
19+
debian/debhelper-build-stamp
20+
debian/delphix-platform.debhelper.log
21+
debian/delphix-platform.substvars
22+
debian/delphix-platform
23+
debian/files

.travis.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
language: generic
2+
sudo: required
3+
4+
branches:
5+
only:
6+
- staging
7+
- trying
8+
- master
9+
10+
services:
11+
- docker
12+
13+
env:
14+
- TARGET=package
15+
- TARGET=shellcheck
16+
- TARGET=shfmtcheck
17+
18+
install:
19+
- docker build -qt delphix-platform:latest docker
20+
21+
script:
22+
- ./scripts/docker-run.sh make $TARGET

Makefile

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#
2+
# Copyright 2018 Delphix
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
.PHONY: \
18+
check \
19+
package \
20+
shellcheck \
21+
shfmtcheck
22+
23+
check: shellcheck shfmtcheck
24+
25+
package:
26+
sed "s/@@VERSION@@/$$(date '+%Y.%m.%d.%H')/" \
27+
debian/changelog.in > debian/changelog
28+
29+
dpkg-buildpackage
30+
31+
@for ext in dsc tar.xz; do \
32+
mv -v ../delphix-platform_*.$$ext artifacts; \
33+
done
34+
35+
@for ext in buildinfo changes deb; do \
36+
mv -v ../delphix-platform_*_amd64.$$ext artifacts; \
37+
done
38+
39+
shellcheck:
40+
shellcheck etc/delphix-platform/ansible/apply
41+
42+
shfmtcheck:
43+
! shfmt -d etc/delphix-platform/ansible/apply | grep .

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Delphix Appliance Platform
2+
3+
## Quickstart
4+
5+
### Building
6+
7+
Run this command on "dlpxdc.co" to create the VM used to do the build:
8+
9+
$ dc clone-latest --size COMPUTE_LARGE bootstrap-18-04 $USER-bootstrap
10+
11+
Log into that VM using the "ubuntu" user, and run these commands:
12+
13+
$ git clone https://github.com/prakashsurya/delphix-platform.git
14+
$ cd delphix-platform
15+
$ ansible-playbook bootstrap/playbook.yml
16+
$ ./scripts/docker-run.sh make package
17+
18+
## Statement of Support
19+
20+
This software is provided as-is, without warranty of any kind or
21+
commercial support through Delphix. See the associated license for
22+
additional details. Questions, issues, feature requests, and
23+
contributions should be directed to the community as outlined in the
24+
[Delphix Community Guidelines](http://delphix.github.io/community-guidelines.html).

artifacts/.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# Copyright 2018 Delphix
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
*.dsc
18+
*.tar.xz
19+
*.buildinfo
20+
*.changes
21+
*.deb

bootstrap/playbook.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#
2+
# Copyright 2018 Delphix
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
---
18+
- hosts: localhost
19+
connection: local
20+
become_user: root
21+
become: true
22+
vars:
23+
ansible_python_interpreter: /usr/bin/python3
24+
roles:
25+
- delphix-platform.bootstrap
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Copyright 2018 Delphix
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
---
18+
- shell: git rev-parse --show-toplevel 2>/dev/null
19+
register: toplevel
20+
21+
- apt:
22+
name: "{{ item }}"
23+
state: present
24+
with_items:
25+
- docker.io
26+
- python3-docker
27+
28+
- docker_image:
29+
path: "{{ toplevel.stdout }}/docker"
30+
name: delphix-platform
31+
force: true

bors.toml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pr_status = [
2+
"license/cla"
3+
]
4+
5+
status = [
6+
"continuous-integration/travis-ci/push"
7+
]

debian/changelog.in

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
delphix-platform (@@VERSION@@) UNRELEASED; urgency=medium
2+
3+
* This changelog is not currently maintained.
4+
5+
-- Delphix Engineering <[email protected]> Mon, 01 Jan 2018 00:00:00 +0000

debian/compat

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10

debian/control

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#
2+
# Copyright 2018 Delphix
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
Source: delphix-platform
18+
Section: metapackages
19+
Priority: optional
20+
Maintainer: Delphix Engineering <[email protected]>
21+
Build-Depends: debhelper (>= 10)
22+
Standards-Version: 4.1.2
23+
24+
Package: delphix-platform
25+
Architecture: any
26+
Replaces: base-files
27+
Depends: ${misc:Depends}, ${delphix:Depends}
28+
Description: Delphix Appliance Platform
29+
This package provides the base platform of the Delphix Appliance. It contains
30+
all the dependencies required to run Ubuntu with a ZFS root filesystem, tools
31+
for efficient debugging in production, and logic to configure the appliance
32+
appropriately.

debian/copyright

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
3+
Files: *
4+
Copyright: 2018 Delphix
5+
License: Apache-2.0
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
.
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
.
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
.
18+
On Debian systems, the complete text of the Apache License, Version 2
19+
can be found in "/usr/share/common-licenses/Apache-2.0".

debian/postinst

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash -eux
2+
#
3+
# Copyright 2018 Delphix
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
case $1 in
19+
configure)
20+
systemctl enable auditd.service
21+
systemctl enable delphix-platform.service
22+
systemctl enable systemd-networkd.service
23+
24+
systemctl disable walinuxagent.service
25+
;;
26+
esac
27+
28+
exit 0

debian/prerm

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash -eux
2+
#
3+
# Copyright 2018 Delphix
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
case $1 in
19+
upgrade|remove)
20+
#
21+
# Removal is not quite the opposite of installation; we leave the
22+
# non-delphix services alone, even if the postinst script changed
23+
# the state of these services. This is because we don't know what
24+
# the state of these services was before the postinst script ran,
25+
# so we can't reliably restore the system back to that prior state.
26+
#
27+
28+
systemctl disable delphix-platform.service
29+
30+
;;
31+
esac
32+
33+
exit 0

0 commit comments

Comments
 (0)