-
Notifications
You must be signed in to change notification settings - Fork 19
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 #123 from jouvin/frontier
Add Frontier-Squid feature
- Loading branch information
Showing
4 changed files
with
59 additions
and
11 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
unique template features/frontier/config; | ||
|
||
include 'features/frontier/rpms'; | ||
|
||
variable FRONTIER_LOCAL_NET ?= list(); | ||
variable FRONTIER_LOCAL_NET = push('127.0.0.1/32'); | ||
variable FRONTIER_HOST_MONITOR ?= list(); | ||
variable FRONTIER_HOST_MONITOR = push('127.0.0.1/32'); | ||
variable FRONTIER_CACHE_MEM ?= "128 MB"; | ||
variable FRONTIER_CACHE_DIR ?= '10000'; | ||
|
||
variable FRONTIER_LOCAL_NET_STRING ?= { | ||
tmp = ""; | ||
foreach (k; v; FRONTIER_LOCAL_NET) { | ||
tmp = tmp + " " + v + " "; | ||
}; | ||
tmp | ||
}; | ||
|
||
variable FRONTIER_HOST_MONITOR_STRING ?= { | ||
tmp = ""; | ||
foreach (k; v; FRONTIER_HOST_MONITOR) { | ||
tmp = tmp + " " + v + " "; | ||
}; | ||
tmp | ||
}; | ||
|
||
include 'components/filecopy/config'; | ||
'/software/components/filecopy/services/{/etc/squid/customized.sh}' = dict( | ||
'config', format( | ||
file_contents('features/frontier/customized.sh.file'), | ||
FRONTIER_LOCAL_NET_STRING, | ||
FRONTIER_HOST_MONITOR_STRING, | ||
FRONTIER_CACHE_MEM, | ||
FRONTIER_CACHE_DIR, | ||
), | ||
'restart', 'service frontier-squid reload', | ||
'perms', '0644', | ||
); | ||
|
||
include 'components/chkconfig/config'; | ||
|
||
'/software/components/chkconfig/service/frontier-squid/on' = ""; | ||
'/software/components/chkconfig/service/frontier-squid/startstop' = true; |
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,10 @@ | ||
#!/bin/bash | ||
# | ||
|
||
awk --file `dirname $0`/customhelps.awk --source '{ | ||
setoption("acl NET_LOCAL src", "%s") | ||
setoption("acl HOST_MONITOR src","%s") | ||
setoption("cache_mem", "%s") | ||
setoptionparameter("cache_dir", 3, "%s") | ||
}' |
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,3 @@ | ||
template features/frontier/rpms; | ||
|
||
'/software/packages' = pkg_repl('frontier-squid'); |
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,19 +1,10 @@ | ||
############################################################ | ||
# | ||
# object template machine-types/nfs | ||
# | ||
# Defines a NFS server | ||
# | ||
# RESPONSIBLE: Michel Jouvin | ||
# | ||
############################################################ | ||
|
||
template machine-types/frontier; | ||
|
||
# CREATE_HOME must be defined as undef | ||
variable CREATE_HOME ?= undef; | ||
|
||
include { 'machine-types/core' }; | ||
include 'machine-types/core'; | ||
|
||
include { 'features/frontier/services' }; | ||
include 'features/frontier/config'; | ||
|