Consequent use of 'alice-lg' instead of 'alicelg'

Replace 'alicelg' on multiple occasions with 'alice-lg'.
* config and default config path
* README.md
* systemd unit, users, paths
* Makefile
This commit is contained in:
Benedikt Rudolph 2019-01-17 12:16:42 +01:00
parent a18cd6484f
commit 41a17fe99f
10 changed files with 41 additions and 44 deletions

3
.gitignore vendored
View File

@ -28,9 +28,8 @@ DIST/
var/
etc/alicelg/alice.conf
etc/alice-lg/alice.conf
.DS_Store
*coverage*

View File

@ -10,7 +10,7 @@ ARCH=amd64
SYSTEM_INIT=systemd
# == END BUILD CONFIGURATION ==
# == END BUILD CONFIGURATION ==
VERSION=$(shell cat ./VERSION)
@ -42,16 +42,16 @@ backend_dev: client_dev
backend_prod: client_prod
$(MAKE) -C backend/ bundle
$(MAKE) -C backend/ linux
alice: client_prod backend_prod
mv backend/alice-lg-* bin/
dist: clean alice
dist: clean alice
mkdir -p $(DIST)opt/ecix/alicelg/bin
mkdir -p $(DIST)etc/alicelg
mkdir -p $(DIST)opt/alice-lg/alice-lg/bin
mkdir -p $(DIST)etc/alice-lg
# Adding post install script
cp install/scripts/after_install $(DIST)/.
@ -67,10 +67,10 @@ else
endif
# Copy example configuration
cp etc/alicelg/alice.example.conf $(DIST)/etc/alicelg/alice.example.conf
cp etc/alice-lg/alice.example.conf $(DIST)/etc/alice-lg/alice.example.conf
# Copy application
cp bin/$(PROG)-linux-$(ARCH) DIST/opt/ecix/alicelg/bin/.
cp bin/$(PROG)-linux-$(ARCH) DIST/opt/ecix/alice-lg/bin/.
rpm: dist
@ -81,7 +81,7 @@ rpm: dist
# Create RPM from dist
fpm -s dir -t rpm -n $(PROG) -v $(VERSION) -C $(DIST) \
--architecture $(ARCH) \
--config-files /etc/alicelg/alice.example.conf \
--config-files /etc/alice-lg/alice.example.conf \
--after-install $(DIST)/after_install \
opt/ etc/
@ -102,7 +102,7 @@ remote_rpm: build_server dist
scp -r $(DIST) $(BUILD_SERVER):$(REMOTE_DIST)
ssh $(BUILD_SERVER) -- fpm -s dir -t rpm -n $(PROG) -v $(VERSION) -C $(REMOTE_DIST) \
--architecture $(ARCH) \
--config-files /etc/alicelg/alice.example.conf \
--config-files /etc/alice-lg/alice.example.conf \
--after-install $(REMOTE_DIST)/after_install \
opt/ etc/

View File

@ -3,7 +3,7 @@ __"No, no! The adventures first, explanations take such a dreadful time."__
_Lewis Carroll, Alice's Adventures in Wonderland & Through the Looking-Glass_
Take a look at an Alice-LG production examples at:
- https://lg-beta.de-cix.net/
- https://lg.de-cix.net/
- https://lg.ecix.net/
And checkout the API at:
@ -23,7 +23,7 @@ Currently Alice-LG supports the following APIs:
Normally you would first install the [birdwatcher API](https://github.com/ecix/birdwatcher) directly on the machine(s) where you run [BIRD](http://bird.network.cz/) on
and then install Alice-LG on a seperate public facing server and point her to the afore mentioned [birdwatcher API](https://github.com/ecix/birdwatcher).
This project was a direct result of the [RIPE IXP Tools Hackathon](https://atlas.ripe.net/hackathon/ixp-tools/)
This project was a direct result of the [RIPE IXP Tools Hackathon](https://atlas.ripe.net/hackathon/ixp-tools/)
just prior to [RIPE73](https://ripe73.ripe.net/) in Madrid, Spain.
Major thanks to Barry O'Donovan who built the original [INEX Bird's Eye](https://github.com/inex/birdseye) BIRD API of which Alice-LG is a spinnoff
@ -63,17 +63,17 @@ Your Alice-LG source will now be located at `~/go/src/github.com/alice-lg/alice-
## Configuration
An example configuration can be found at
[etc/alicelg/alice.example.conf](https://github.com/ecix/alice-lg/blob/readme_update/etc/alicelg/alice.example.conf).
An example configuration can be found at
[etc/alice-lg/alice.example.conf](https://github.com/alice-lg/alice-lg/blob/readme_update/etc/alice-lg/alice.example.conf).
You can copy it to any of the following locations:
etc/alicelg/alice.conf # local
etc/alicelg/alice.local.conf # local
/etc/alicelg/alice.conf # global
etc/alice-lg/alice.conf # local
etc/alice-lg/alice.local.conf # local
/etc/alice-lg/alice.conf # global
You will have to edit the configuration file as you need to point Alice-LG to the correct [APIs](https://github.com/ecix/birdwatcher):
You will have to edit the configuration file as you need to point Alice-LG to the correct [APIs](https://github.com/alice-lg/birdwatcher):
```ini
[source.0]
@ -127,15 +127,15 @@ In your alice.conf, you now can specify a theme by setting:
with the optional parameter (the "mountpoint" of the theme)
url_base = /theme
You can put assets (images, fonts, javscript, css) in
You can put assets (images, fonts, javscript, css) in
this folder.
Stylesheets and Javascripts are automatically included in
the client's html and are served from the backend.
Alice provides early stages of an extension API, which is for now
Alice provides early stages of an extension API, which is for now
only used to modify the content of the welcome screen,
by providing a javascript in your theme containing:
@ -146,7 +146,7 @@ Alice.updateContent({
tagline: "powered by Alice"
}
});
```
For an example check out: https://github.com/alice-lg/alice-theme-example
@ -154,7 +154,7 @@ For an example check out: https://github.com/alice-lg/alice-theme-example
## Hacking
The client is a Single Page React Application.
All sources are available in `client/`.
All sources are available in `client/`.
Install build tools as needed:

View File

@ -621,9 +621,9 @@ func getSources(config *ini.File) ([]*SourceConfig, error) {
// Try to load configfiles as specified in the files
// list. For example:
//
// ./etc/alicelg/alice.conf
// /etc/alicelg/alice.conf
// ./etc/alicelg/alice.local.conf
// ./etc/alice-lg/alice.conf
// /etc/alice-lg/alice.conf
// ./etc/alice-lg/alice.local.conf
//
func loadConfig(file string) (*Config, error) {

View File

@ -9,7 +9,7 @@ import (
func TestLoadConfigs(t *testing.T) {
config, err := loadConfig("../etc/alicelg/alice.example.conf")
config, err := loadConfig("../etc/alice-lg/alice.example.conf")
if err != nil {
t.Error("Could not load test config:", err)
}
@ -39,7 +39,7 @@ func TestLoadConfigs(t *testing.T) {
func TestSourceConfigDefaultsOverride(t *testing.T) {
config, err := loadConfig("../etc/alicelg/alice.example.conf")
config, err := loadConfig("../etc/alice-lg/alice.example.conf")
if err != nil {
t.Error("Could not load test config:", err)
}
@ -70,7 +70,7 @@ func TestSourceConfigDefaultsOverride(t *testing.T) {
}
func TestRejectAndNoexportReasons(t *testing.T) {
config, err := loadConfig("../etc/alicelg/alice.example.conf")
config, err := loadConfig("../etc/alice-lg/alice.example.conf")
if err != nil {
t.Error("Could not load test config:", err)
}
@ -97,7 +97,7 @@ func TestRejectAndNoexportReasons(t *testing.T) {
}
func TestBlackholeParsing(t *testing.T) {
config, err := loadConfig("../etc/alicelg/alice.example.conf")
config, err := loadConfig("../etc/alice-lg/alice.example.conf")
if err != nil {
t.Error("Could not load test config:", err)
}
@ -116,7 +116,7 @@ func TestBlackholeParsing(t *testing.T) {
}
func TestOwnASN(t *testing.T) {
config, err := loadConfig("../etc/alicelg/alice.example.conf")
config, err := loadConfig("../etc/alice-lg/alice.example.conf")
if err != nil {
t.Error("Could not load test config:", err)
}
@ -127,7 +127,7 @@ func TestOwnASN(t *testing.T) {
}
func TestRpkiConfig(t *testing.T) {
config, err := loadConfig("../etc/alicelg/alice.example.conf")
config, err := loadConfig("../etc/alice-lg/alice.example.conf")
if err != nil {
t.Error("Could not load test config:", err)
}
@ -157,7 +157,7 @@ func TestRpkiConfig(t *testing.T) {
}
func TestRejectCandidatesConfig(t *testing.T) {
config, err := loadConfig("../etc/alicelg/alice.example.conf")
config, err := loadConfig("../etc/alice-lg/alice.example.conf")
if err != nil {
t.Error("Could not load test config:", err)
return

View File

@ -17,7 +17,7 @@ func main() {
// Handle commandline parameters
configFilenameFlag := flag.String(
"config", "/etc/alicelg/alice.conf",
"config", "/etc/alice-lg/alice.conf",
"Alice looking glass configuration file",
)

View File

@ -5,12 +5,11 @@
# Create the required user and set permissions
#
SERVICE=alicelg
SERVICE=alice-lg
echo "[i] Post install $SERVICE"
echo "[i] Creating user and updating permissions"
useradd --system -d /opt/ecix/$SERVICE $SERVICE
useradd --system -d /opt/alice-lg/$SERVICE $SERVICE
echo "[i] Fixing permissions"
chown -R $SERVICE:$SERVICE /opt/ecix/$SERVICE
chown -R $SERVICE:$SERVICE /opt/alice-lg/$SERVICE

View File

@ -5,8 +5,8 @@ After=network.target
[Service]
Type=simple
User=alicelg
ExecStart=/opt/ecix/alicelg/bin/alice-lg-linux-amd64
User=alice-lg
ExecStart=/opt/alice-lg/alice-lg/bin/alice-lg-linux-amd64
[Install]
WantedBy=multi-user.target

View File

@ -1,5 +1,5 @@
# Alice Looking Glass
# Alice Looking Glass
description "Alice Looking Glass"
author "Matthias Hannig <mha@ecix.net>"
@ -10,5 +10,4 @@ respawn limit 20 10
start on runlevel [2345]
stop on runlevel [!2345]
exec su -l alicelg -c /opt/ecix/alicelg/bin/alice-lg-linux-amd64 2>&1 | logger -i -t 'ALICE LG'
exec su -l alice-lg -c /opt/alice-lg/alice-lg/bin/alice-lg-linux-amd64 2>&1 | logger -i -t 'ALICE LG'