Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
slapos.package
Commits
b1a398d9
Commit
b1a398d9
authored
Jan 15, 2014
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update quick installer for debian to follow up changes on packages
parent
81e1cdb2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
85 deletions
+2
-85
debian-preseed/slapos-quick-install.sh
debian-preseed/slapos-quick-install.sh
+2
-85
No files found.
debian-preseed/slapos-quick-install.sh
View file @
b1a398d9
...
...
@@ -8,35 +8,17 @@ if [ -z "$COMPUTERNAME" ]; then
exit
1
fi
if
[
!
-f
/etc/apt/sources.list.d/git.erp5.org.list
]
;
then
gpg
--keyserver
subkeys.pgp.net
--recv-keys
1A716324
gpg
--export
1A716324 | apt-key add -
echo
"deb http://git.erp5.org/dist/deb ./"
>
/etc/apt/sources.list.d/git.erp5.org.list
fi
if
[
!
-f
/etc/apt/sources.list.d/slapos.list
]
;
then
echo
"deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/Debian_7.0/ ./"
|
tee
/etc/apt/sources.list.d/slapos.list
wget
-O-
"http://download.opensuse.org/repositories/home:/VIFIBnexedi/Debian_7.0/Release.key"
| apt-key add -
fi
apt-get update
apt-get
install
-y
slapos-node re6stnet
echo
"[HACKING] Fixing Package ..."
rm
-rf
/etc/openvpn/vifi
*
rm
-rf
/etc/opt/slapos/openvpn-needed
service openvpn restart
sed
-i
"/tapVPN/d"
/etc/cron.d/slapos-node
apt-get
install
-y
slapos-node
if
[
!
-f
/etc/re6stnet/re6stnet.conf
]
;
then
# Register re6stnet.
re6st-conf
--registry
http://re6stnet.nexedi.com/
-r
title
$COMPUTERNAME
-d
/etc/re6stnet
--anonymous
slapos-re6st-setup
$COMPUTERNAME
# For some reason this initial restart still needed
# for workarround eventual default routes.
/etc/init.d/re6stnet restart
sleep
2
...
...
@@ -71,76 +53,11 @@ if [ ! -f /etc/opt/slapos/slapos.cfg ]; then
slapos node register
$COMPUTERNAME
--partition-number
20
--ipv6-interface
lo
--interface-name
eth0
fi
# Create PKI repository
if
[
!
-f
/etc/opt/slapos/slapos.cfg
]
;
then
echo
""" /etc/opt/slapos/slapos.cfg don't exist, so we don't progress on tweak """
exit
1
fi
cat
>
/usr/local/sbin/slapos-tweak
<<
EOF
#!/bin/sh -e
mkdir -v -p -m 0755 `grep ^certificate_repository_path /etc/opt/slapos/slapos.cfg | sed 's/^certificate_repository_path.*= *//'`
grep ^computer_id /etc/opt/slapos/slapos.cfg | sed 's/^computer_id.*= *//' > /etc/hostname
hostname -F /etc/hostname
echo """ [SERVER TWEAK] Set sysctl, load kvm_intel and other modules."""
# Setup more server like network parameters in order to avoid
# "Neighbour table overflow."
# Those machines are itself has a lot of interfaces and are in
# heavily networked environment, so limit of ARP cache for IPv4
# and IPv6 is 4x higher then default
# More tuning can be applied from: http://www.enigma.id.au/linux_tuning.txt
sysctl -w
\
net.ipv4.neigh.default.gc_thresh1=512
\
net.ipv4.neigh.default.gc_thresh2=1024
\
net.ipv4.neigh.default.gc_thresh3=2048
\
net.ipv6.neigh.default.gc_thresh1=512
\
net.ipv6.neigh.default.gc_thresh2=1024
\
net.ipv6.neigh.default.gc_thresh3=2048
# Increase default aio-max-nr for sql servers
sysctl -w fs.aio-max-nr=16777216
# Increase semaphore limits
sysctl -w kernel.sem="1250 256000 100 1024"
# Force reboot after kernel panic
sysctl -w kernel.panic=120
# Yes we hardcode this here for debian
e2label /dev/sda1 SLAPOS
# Enable noop scheduler for disk which have SLAPOS labeled partition
disk=
\`
blkid -L SLAPOS | sed -r -e 's/(
\/
dev
\/
|[0-9]*
$)
//g'
\`
echo noop > /sys/block/
\$
disk/queue/scheduler
# Set kvm up
modprobe kvm_intel
sleep 1
chmod 666 /dev/kvm
# By pass if some of the followed modules are not available.
# This is usually needed or preferred for a specific hardware/distribution.
set +e
# Set power saving
modprobe acpi_cpufreq > /dev/null 2>&1
# Set hardware monitoring tools (for Shuttle xh61 machines)
modprobe coretemp > /dev/null 2>&1
modprobe f71882fg > /dev/null 2>&1
set -e
# Activate KSM (shared memory for KVM)
echo 1 > /sys/kernel/mm/ksm/run
slapos node format -v -c --now
echo "[SlapOS Tweak] Finished at: "
date
EOF
chmod
a+x /usr/local/sbin/slapos-tweak
slapos-tweak
cat
>
/etc/cron.d/slapos-boot
<<
EOF
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment