Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediaserver
envsetup
Commits
14b4166e
Commit
14b4166e
authored
8 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Fixed APT cacher conf.
parent
6775d7e9
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
23.Initialize_APT/0_setup.sh
+1
-1
1 addition, 1 deletion
23.Initialize_APT/0_setup.sh
51.Install_CM/0_setup.sh
+11
-16
11 additions, 16 deletions
51.Install_CM/0_setup.sh
default-conf.sh
+0
-3
0 additions, 3 deletions
default-conf.sh
with
12 additions
and
20 deletions
23.Initialize_APT/0_setup.sh
+
1
−
1
View file @
14b4166e
...
...
@@ -2,7 +2,7 @@
source
/root/envsetup/conf.sh
# migrate to Ubuntu 16.04 / apply sources.list
if
(
cat
/etc/lsb-release
|
grep
'14.04'
)
;
then
if
(
rgrep
'14.04'
/etc/lsb-release
>
/dev/null
)
;
then
# upgrade to Ubuntu 16.04
apt-get update
apt-get dist-upgrade
-y
...
...
This diff is collapsed.
Click to expand it.
51.Install_CM/0_setup.sh
+
11
−
16
View file @
14b4166e
#!/bin/bash
source
/root/envsetup/conf.sh
#APT_CACHER_PWD=$(cat ${CONF} | egrep ^APT_CACHER_PWD | head -1 | awk -F "=" '{print$2}')
APT_CACHER_PWD
=
$(
pwgen 12
)
# installation cm
# install cm
apt-get
install
-y
campus-manager
# configure nginx
sed
-i
"s@server_name skyreach;@server_name
${
CM_SERVER_NAME
}
;@"
/etc/nginx/sites-available/skyreach.conf
service nginx restart
# install
ation
cache
local
# install
apt
cache
r
apt-get
install
-y
apt-cacher-ng
# secure it
echo
"AdminAuth:
${
APT_CACHER_USER
}
:
${
APT_CACHER_PWD
}
"
>>
/etc/apt-cacher-ng/security.conf
service apt-cacher-ng restart
if
(
!
rgrep
'AdminAuth: admin:'
/etc/apt-cacher-ng/security.conf
>
/dev/null
)
;
then
APT_CACHER_PWD
=
"
$(
pwgen 12
)
"
echo
"AdminAuth: admin:
${
APT_CACHER_PWD
}
"
>>
/etc/apt-cacher-ng/security.conf
service apt-cacher-ng restart
fi
# proxy
if
[
${
PROXY
}
=
"1"
]
;
then
...
...
@@ -24,21 +27,13 @@ if [ ${PROXY} = "1" ]; then
fi
fi
# configure nginx
python3 /root/envsetup/envsetup.py 7
# devrait être inutile mais pb constaté avec jenkins
sed
-i
"s@server_name skyreach;@server_name
${
CM_SERVER_NAME
}
;@"
/etc/nginx/sites-available/skyreach.conf
#~mv /etc/nginx/sites-enabled/skyreach.conf.tmp /etc/nginx/sites-enabled/skyreach.conf
service nginx restart
# iptables rules for port 3142
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-y
iptables-persistent
iptables
-A
INPUT
-p
tcp
-s
localhost
--destination-port
3142
-j
ACCEPT
iptables
-A
INPUT
-p
tcp
--destination-port
3142
-j
DROP
iptables-save
# the save using "service" command fails on VM
if
(
cat
/etc/lsb-release
|
grep
'14.04'
)
;
then
if
(
rgrep
'14.04'
/etc/lsb-release
>
/dev/null
)
;
then
update-rc.d iptables-persistent
enable
service iptables-persistent save
||
true
else
...
...
This diff is collapsed.
Click to expand it.
default-conf.sh
+
0
−
3
View file @
14b4166e
...
...
@@ -66,9 +66,6 @@ MONITOR_ADMIN_PWD='test'
CM_SERVER_NAME
=
'campusmanager'
CM_SUPERUSER_PWD
=
'test'
CM_ADMIN_PWD
=
'test'
# APT cacher (dependency of CM)
APT_CACHER_USER
=
'admin'
#APT_CACHER_PWD=AUTOMATICALLY GENERATED
# -- MySQL --
# if no password is set, it will not be changed or set
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment