Difference between revisions of "Modeling Project Releng/Component Creation/Build Server Setup"

From Eclipsepedia

Jump to: navigation, search
m (Add new user)
m
Line 4: Line 4:
 
  su
 
  su
  
  for newuser in ''newuser''; do \
+
  for newuser in ''newuser'' ''anotheruser''; do \
 
   /usr/sbin/adduser $newuser; \
 
   /usr/sbin/adduser $newuser; \
 
   /usr/sbin/usermod -G www -p ${newuser}1 $newuser; \
 
   /usr/sbin/usermod -G www -p ${newuser}1 $newuser; \
Line 13: Line 13:
  
 
<table><tr><td>
 
<table><tr><td>
  export newcomponent=''newcomponent'';
+
  for newcomponent in ''newcomponent'' ''anothercomponent''; do \
 
+
  cd /home/www-data/build/modeling/emft; mkdir $newcomponent; \
cd /home/www-data/build/modeling/emft; mkdir $newcomponent; \
+
  chown apache:apache *; chmod g+w *; \
chown apache:apache *; chmod g+w *; \
+
  cd /var/www/html/modeling/emft/; cvs up -Pd $newcomponent; \
cd /var/www/html/modeling/emft/; cvs up -Pd $newcomponent; \
+
  cd $newcomponent; \
cd $newcomponent; \
+
  chown -R www * .*; chmod -R g+w * .*; \
chown -R www * .*; chmod -R g+w * .*; \
+
  cd /var/www/html/modeling/emft/$newcomponent/build/; \
cd /var/www/html/modeling/emft/$newcomponent/build/; \
+
  cd /var/www/html/modeling/emft/cdo/build/.htaccess .; \
cd /var/www/html/modeling/emft/cdo/build/.htaccess .; \
+
  chmod 664 .htaccess; \
chmod 664 .htaccess; \
+
  cd /var/www/html/modeling/emft/$newcomponent; \
cd /var/www/html/modeling/emft/$newcomponent; \
+
  ln -s /home/www-data/build/modeling/emft/$newcomponent/downloads/; \
ln -s /home/www-data/build/modeling/emft/$newcomponent/downloads/
+
done
 
</td></tr></table>
 
</td></tr></table>
 
  
 
== Edit firewall ==
 
== Edit firewall ==
Line 33: Line 32:
 
  /sbin/iptables -I INPUT -p tcp -s ''newhost_or_IP'' --dport 22 -j ACCEPT # ''newuser'' (''newcomponent'')
 
  /sbin/iptables -I INPUT -p tcp -s ''newhost_or_IP'' --dport 22 -j ACCEPT # ''newuser'' (''newcomponent'')
 
</td></tr></table>
 
</td></tr></table>
 
  
 
== Announcement ==
 
== Announcement ==
Line 40: Line 38:
  
  
[[Category:Releng]] [[Category:EMFT]]
+
[[Category:Releng]] [[Category:EMFT]] [[Category:Modeling]]
[[Category:Modeling]]
+

Revision as of 14:51, 14 November 2007

Contents

Add new user

su
for newuser in newuser anotheruser; do \
  /usr/sbin/adduser $newuser; \
  /usr/sbin/usermod -G www -p ${newuser}1 $newuser; \
done

Add new component

for newcomponent in newcomponent anothercomponent; do \
  cd /home/www-data/build/modeling/emft; mkdir $newcomponent; \
  chown apache:apache *; chmod g+w *; \
  cd /var/www/html/modeling/emft/; cvs up -Pd $newcomponent; \
  cd $newcomponent; \
  chown -R www * .*; chmod -R g+w * .*; \
  cd /var/www/html/modeling/emft/$newcomponent/build/; \
  cd /var/www/html/modeling/emft/cdo/build/.htaccess .; \
  chmod 664 .htaccess; \
  cd /var/www/html/modeling/emft/$newcomponent; \
  ln -s /home/www-data/build/modeling/emft/$newcomponent/downloads/; \
done

Edit firewall

/sbin/iptables -I INPUT -p tcp -s newhost_or_IP --dport 22 -j ACCEPT # newuser (newcomponent)

Announcement

Finally, send the user an email or IM with his new .htaccess and ssh usernames/passwords.