Skip to content

Commit 5c428eb

Browse files
committed
Merge jidometa-scripts into jidoteki-admin
1 parent 92560ba commit 5c428eb

File tree

13 files changed

+511
-42
lines changed

13 files changed

+511
-42
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.modules/

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: bash
2+
sudo: required
3+
cache: apt
4+
dist: precise
5+
6+
before_script:
7+
- wget http://software-lab.de/picoLisp-16.6.tgz -O /tmp/picolisp.tgz
8+
- cd /tmp; tar -xf /tmp/picolisp.tgz
9+
- cd /tmp/picoLisp/src64 && make
10+
- export PATH=$PATH:/tmp/picoLisp
11+
- sudo pip install ansible==1.8.4
12+
13+
script:
14+
- export PATH=$PATH:/tmp/picoLisp
15+
- cd ${TRAVIS_BUILD_DIR} && make check PREFIX_DIR=/tmp/meta

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 1.20.0 (2018-02-04)
4+
5+
* Update process uses fixed disk temporarily, reduces memory requirement for update packages
6+
* Merge 'jidometa-scripts' repo into this one
7+
* Add Travis tests for tc-functions helpers
8+
* Renamed 'Jidoteki' to 'On-Prem'
9+
310
## 1.19.0 (2017-12-17)
411

512
* Dry-run stunnel to check for valid TLS certs

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2013-2017 Alexander Williams, Unscramble <[email protected]>
3+
Copyright (c) 2013-2018 Alexander Williams, Unscramble <[email protected]>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Jidoteki Admin Makefile
2+
3+
.PHONY: all check run-tests
4+
5+
all:
6+
ansible-playbook jidoteki.yml -c local -i images.inventory -e prefix=$(PREFIX_DIR) --tags=admin -s -v
7+
8+
check: all run-tests
9+
10+
run-tests:
11+
JIDO_ADMIN_PATH=$(PREFIX_DIR)/opt/jidoteki/tinyadmin ./test.l

README.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,49 @@
1-
# Jidoteki virtual appliance & live image administration
1+
# On-Prem virtual appliance & live image administration
22

3-
[![GitHub release](https://img.shields.io/github/release/unscramble/jidoteki-admin.svg)](https://jidoteki.com)
3+
[![GitHub release](https://img.shields.io/github/release/on-prem/jidoteki-admin.svg)](https://on-premises.com) [![Build Status](https://travis-ci.org/on-prem/jidoteki-admin.svg?branch=master)](https://travis-ci.org/on-prem/jidoteki-admin) [![Dependency](https://img.shields.io/badge/[deps]&#32;picolisp--semver-v0.10.0-ff69b4.svg)](https://github.com/aw/picolisp-semver) [![Dependency](https://img.shields.io/badge/[deps]&#32;picolisp--json-v3.2.0-ff69b4.svg)](https://github.com/aw/picolisp-json) [![Dependency](https://img.shields.io/badge/[deps]&#32;picolisp--unit-v2.1.0-ff69b4.svg)](https://github.com/aw/picolisp-unit.git)
44

5-
[Jidoteki](https://jidoteki.com) installs the `Jidoteki Admin` package in `/opt/jidoteki`.
5+
[On-Prem](https://on-premises.com) installs the `On-Prem Admin` package in `/opt/jidoteki`.
66

77
This repository contains bash scripts, ansible roles, and other files needed to perform remote virtual appliance or live image administration, updates, etc.
88

9-
## Requirements
9+
# Requirements
1010

1111
* Ansible 1.5.x
1212
* curl
13+
* git
1314
* sha1sum (from core-utils)
14-
* [symlinktool](https://github.com/aw/tinycore-symlinktool) for running backups
15+
* [symlinktool](https://github.com/on-prem/tinycore-symlinktool) for running backups
1516
* [openssl](https://openssl.org/) v1.0.2+, for validating TLS certs
1617
* [stunnel](https://www.stunnel.org) for validating TLS certs
1718

18-
## Ansible roles
19+
# Usage
1920

20-
There is 1 role executed:
21+
```
22+
# replace <destdir> with the directory prefix to install the files
23+
ansible-playbook jidoteki.yml -c local -i images.inventory -e prefix=<destdir> --tags=admin
24+
```
2125

22-
- admin
26+
### tags
2327

24-
### admin role
28+
There exist two `tags` for running the ansible roles:
29+
30+
- **admin**: executes every task in the role, installing all On-Prem Admin scripts
31+
- **lib**: only executes tasks related to the lib dependencies, without the On-Prem Admin scripts
2532

26-
The `admin` configures directories and files in `/opt/jidoteki/admin` or `/opt/jidoteki/tinyadmin`.
33+
### admin role
2734

28-
Here is what the `admin` role does:
35+
The `admin` role configures directories and files in `/opt/jidoteki/tinyadmin`:
2936

3037
* Create admin directory structure
3138
* Create admin directories writeable by root/admin
3239
* Create admin sftp uploads directory
3340
* Add SSH admin management scripts
3441
* Add SSH admin wrapper script
42+
* Add SSH admin lib dependencies
43+
44+
# Tests
45+
46+
To run the tests, type `make check`
3547

3648
# Changelog
3749

group_vars/images

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,15 @@ admin_type: LIVE IMAGE
55
admin_type_lowcase: live image
66
ssh_path: /usr/local/etc/ssh
77

8-
jidoteki_admin_version: 1.19.0
8+
jidoteki_admin_version: 1.20.0
9+
10+
jidoteki_lib_deps:
11+
- repo: https://github.com/aw/picolisp-json.git
12+
dir: .modules/picolisp-json/HEAD
13+
ref: v3.2.0
14+
- repo: https://github.com/aw/picolisp-semver.git
15+
dir: .modules/picolisp-semver/HEAD
16+
ref: v0.10.0
17+
- repo: https://github.com/aw/picolisp-unit.git
18+
dir: .modules/picolisp-unit/HEAD
19+
ref: v2.1.0

images.inventory

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[images]
2-
images ansible_python_interpreter=/usr/local/bin/python
2+
images

roles/admin/tasks/main.yml

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,6 @@
22
#
33
# user/group 998 = sftpadmin, 997 = admin, 50 = staff, 0 = root
44

5-
- name: Create admin home directories
6-
file: >
7-
state=directory
8-
path={{ prefix }}{{ item }}
9-
owner=997
10-
group=997
11-
mode=1750
12-
recurse=no
13-
with_items:
14-
- "{{ admin_path }}/home"
15-
- "{{ admin_path }}/home/.ssh"
16-
tags:
17-
- admin
18-
195
- name: Create admin directory structure
206
file: >
217
state=directory
@@ -24,11 +10,28 @@
2410
group=0
2511
mode=0755
2612
with_items:
13+
- "{{ admin_path }}"
2714
- "{{ admin_path }}/bin"
2815
- "{{ admin_path }}/tmp"
16+
- "{{ admin_path }}/lib"
2917
- "{{ admin_path }}/home/sftp"
3018
tags:
3119
- admin
20+
- lib
21+
22+
- name: Create admin home directories
23+
file: >
24+
state=directory
25+
path={{ prefix }}{{ item }}
26+
owner=997
27+
group=997
28+
mode=1750
29+
recurse=no
30+
with_items:
31+
- "{{ admin_path }}/home"
32+
- "{{ admin_path }}/home/.ssh"
33+
tags:
34+
- admin
3235

3336
- name: Create admin sftp uploads directory
3437
file: >
@@ -87,3 +90,27 @@
8790
mode=0750
8891
tags:
8992
- admin
93+
94+
- name: Add SSH admin library scripts
95+
template: >
96+
src={{ item }}.j2
97+
dest="{{ prefix }}{{ admin_path }}/lib/{{ item }}"
98+
owner=0
99+
group=0
100+
mode=0644
101+
with_items:
102+
- tc-functions.l
103+
tags:
104+
- admin
105+
- lib
106+
107+
- name: Add SSH admin library deps
108+
git: >
109+
dest={{ prefix }}{{ admin_path }}/lib/{{ item.dir }}
110+
repo={{ item.repo }}
111+
version={{ item.ref }}
112+
with_items:
113+
- "{{ jidoteki_lib_deps }}"
114+
tags:
115+
- admin
116+
- lib

0 commit comments

Comments
 (0)