Commit 965be5ea authored by Leigh Stoller's avatar Leigh Stoller

Initial work at generalizing the genirack target automated setup,

as per issue #440.
parent b322a14e
......@@ -78,7 +78,7 @@ my $THISHOMEBASE= "@THISHOMEBASE@";
my $PROTOUSER = 'elabman';
my $ELABINELAB = @ELABINELAB@;
my $PGENISUPPORT= @PROTOGENI_SUPPORT@;
my $GENIRACK = @PROTOGENI_GENIRACK@;
my $CONFIG_TARGETSYS = @CONFIG_TARGETSYS@;
my $SAMBANODE = "fs"; # DNS makes this do the right thing in E-in-E.
my $SMBPASSWD = "/usr/local/bin/smbpasswd";
......@@ -472,7 +472,7 @@ sub AddUser()
#
# Leave the password "starred" on elabinelab; safer.
#
if (!$ELABINELAB || $GENIRACK) {
if (!$ELABINELAB && !$CONFIG_TARGETSYS) {
# shell escape.
$pswd =~ s/\$/\\\$/g;
$pswd =~ s/\*/\\\*/g;
......@@ -750,7 +750,7 @@ sub UpdatePassword()
# Change on ops only if there is a real account there.
# For ELABINELAB, safer to leave the password "starred".
#
if (!$wikionly && (!$ELABINELAB || $GENIRACK)) {
if (!$wikionly && !$ELABINELAB && !$CONFIG_TARGETSYS) {
#
# Grab from the DB to avoid taint checking sillyness.
#
......
......@@ -219,7 +219,7 @@ my %emulabconfig = (
# CONFIG_QUERIER configure mfrisbeed to act as IGMP querier
# CONFIG_OPSVM configure ops node to be jail on boss (obsolete)
# CONFIG_NODBINIT do not load DB state on boss
# CONFIG_GENIRACK configure as a GENI rack
# CONFIG_TARGETSYS configure for a target system
# CONFIG_ZFS configure fs node to use ZFS
# CONFIG_AUTOFS configure autofs instead of amd for boss ZFS mounts
#
......@@ -233,7 +233,6 @@ my %emulabconfig = (
"CONFIG_QUERIER" => $NEEDQUERIER,
"CONFIG_OPSVM" => $OPSVM,
"CONFIG_NODBINIT" => 0,
"CONFIG_GENIRACK" => 0,
"CONFIG_TARGETSYS" => 0,
"CONFIG_ZFS" => 0,
"CONFIG_AUTOFS" => 0,
......@@ -1306,7 +1305,7 @@ sub SetupFsNode()
skipsetup:
return
if ($emulabconfig{"CONFIG_GENIRACK"});
if ($emulabconfig{"CONFIG_TARGETSYS"});
#
# Hmm, need to run this at startup though.
......@@ -1862,30 +1861,28 @@ sub SetupOpsNode($)
else {
print RC "defaultrouter=\"$bossnode_ip\"\n";
}
if ($emulabconfig{"CONFIG_GENIRACK"} &&
exists($emulabconfig{"GENIRACK_OPSIP"}) &&
if ($emulabconfig{"CONFIG_TARGETSYS"} &&
exists($emulabconfig{"TARGETSYS_OPSIP"}) &&
$emulabconfig{"CONFIG_SINGLECNET"}) {
my $GENIRACK_NETWORK = $emulabconfig{"GENIRACK_NETWORK"};
my $GENIRACK_NETMASK = $emulabconfig{"GENIRACK_NETMASK"};
my $GENIRACK_OPSIP = $emulabconfig{"GENIRACK_OPSIP"};
my $GENIRACK_DOMAIN = $emulabconfig{"GENIRACK_DOMAIN"};
my $TARGETSYS_NETWORK = $emulabconfig{"TARGETSYS_NETWORK"};
my $TARGETSYS_NETMASK = $emulabconfig{"TARGETSYS_NETMASK"};
my $TARGETSYS_OPSIP = $emulabconfig{"TARGETSYS_OPSIP"};
my $TARGETSYS_DOMAIN = $emulabconfig{"TARGETSYS_DOMAIN"};
print RC "ifconfig_${outer_controlif}_alias0=".
"\"inet $GENIRACK_OPSIP netmask $GENIRACK_NETMASK\"\n";
"\"inet $TARGETSYS_OPSIP netmask $TARGETSYS_NETMASK\"\n";
print RC "static_routes=\"\$static_routes genirack\"\n";
print RC "route_genirack=\"-net $GENIRACK_NETWORK ".
" -netmask $GENIRACK_NETMASK -iface $outer_controlif\"\n";
print RC "static_routes=\"\$static_routes targetsys\"\n";
print RC "route_targetsys=\"-net $TARGETSYS_NETWORK ".
" -netmask $TARGETSYS_NETMASK -iface $outer_controlif\"\n";
print RC "hostname=\"" . "ops" . "." . $GENIRACK_DOMAIN . "\"\n";
print RC "hostname=\"" . "ops" . "." . $TARGETSYS_DOMAIN . "\"\n";
#
# Need to enact these changes now before trying setup Emulab
#
mysystem("ifconfig $outer_controlif ".
"inet $GENIRACK_OPSIP netmask $GENIRACK_NETMASK add");
#mysystem("route add -net $GENIRACK_NETWORK ".
# "-netmask $GENIRACK_NETMASK -iface $outer_controlif");
"inet $TARGETSYS_OPSIP netmask $TARGETSYS_NETMASK add");
}
else {
print RC "hostname=\"" . $emulabconfig{"OPSNODE"} . "." . $domain . "\"\n";
......@@ -1895,9 +1892,9 @@ sub SetupOpsNode($)
#
# Localize the timezone for the Geni Racks
#
if ($emulabconfig{"CONFIG_GENIRACK"} &&
exists($emulabconfig{"GENIRACK_TIMEZONE"})) {
my $zonefile = $emulabconfig{"GENIRACK_TIMEZONE"};
if ($emulabconfig{"CONFIG_TARGETSYS"} &&
exists($emulabconfig{"TARGETSYS_TIMEZONE"})) {
my $zonefile = $emulabconfig{"TARGETSYS_TIMEZONE"};
mysystem("cp -fp /usr/share/zoneinfo/$zonefile /etc/localtime");
}
......@@ -2574,29 +2571,27 @@ sub SetupBossNode($)
print RC "ifconfig_${outer_controlif}=".
"\"inet $outer_ip netmask $outer_netmask $tso\"\n";
if ($emulabconfig{"CONFIG_GENIRACK"} &&
exists($emulabconfig{"GENIRACK_BOSSIP"}) &&
if ($emulabconfig{"CONFIG_TARGETSYS"} &&
exists($emulabconfig{"TARGETSYS_BOSSIP"}) &&
$emulabconfig{"CONFIG_SINGLECNET"}) {
my $GENIRACK_NETWORK = $emulabconfig{"GENIRACK_NETWORK"};
my $GENIRACK_NETMASK = $emulabconfig{"GENIRACK_NETMASK"};
my $GENIRACK_BOSSIP = $emulabconfig{"GENIRACK_BOSSIP"};
my $GENIRACK_DOMAIN = $emulabconfig{"GENIRACK_DOMAIN"};
my $TARGETSYS_NETWORK = $emulabconfig{"TARGETSYS_NETWORK"};
my $TARGETSYS_NETMASK = $emulabconfig{"TARGETSYS_NETMASK"};
my $TARGETSYS_BOSSIP = $emulabconfig{"TARGETSYS_BOSSIP"};
my $TARGETSYS_DOMAIN = $emulabconfig{"TARGETSYS_DOMAIN"};
print RC "ifconfig_${outer_controlif}_alias0=".
"\"inet $GENIRACK_BOSSIP netmask $GENIRACK_NETMASK\"\n";
"\"inet $TARGETSYS_BOSSIP netmask $TARGETSYS_NETMASK\"\n";
print RC "static_routes=\"\$static_routes genirack\"\n";
print RC "route_genirack=\"-net $GENIRACK_NETWORK ".
" -netmask $GENIRACK_NETMASK -iface $outer_controlif\"\n";
print RC "static_routes=\"\$static_routes targetsys\"\n";
print RC "route_targetsys=\"-net $TARGETSYS_NETWORK ".
" -netmask $TARGETSYS_NETMASK -iface $outer_controlif\"\n";
print RC "hostname=\"" . "boss" . "." . $GENIRACK_DOMAIN . "\"\n";
print RC "hostname=\"" . "boss" . "." . $TARGETSYS_DOMAIN . "\"\n";
#
# Need to enact these changes now before trying setup Emulab
#
mysystem("ifconfig $outer_controlif ".
"inet $GENIRACK_BOSSIP netmask $GENIRACK_NETMASK add");
#mysystem("route add -net $GENIRACK_NETWORK ".
# "-netmask $GENIRACK_NETMASK -iface $outer_controlif");
"inet $TARGETSYS_BOSSIP netmask $TARGETSYS_NETMASK add");
}
else {
print RC "hostname=\"" . $emulabconfig{"BOSSNODE"} . "." . $domain . "\"\n";
......@@ -2675,11 +2670,11 @@ sub SetupBossNode($)
close(RC);
#
# Localize the timezone for the Geni Racks
# Localize the timezone for the target.
#
if ($emulabconfig{"CONFIG_GENIRACK"} &&
exists($emulabconfig{"GENIRACK_TIMEZONE"})) {
my $zonefile = $emulabconfig{"GENIRACK_TIMEZONE"};
if ($emulabconfig{"CONFIG_TARGETSYS"} &&
exists($emulabconfig{"TARGETSYS_TIMEZONE"})) {
my $zonefile = $emulabconfig{"TARGETSYS_TIMEZONE"};
mysystem("cp -fp /usr/share/zoneinfo/$zonefile /etc/localtime");
}
......@@ -2823,7 +2818,7 @@ sub SetupBossNode($)
# the non-singlenet case, we restrict it to that.
#
if (! $emulabconfig{"CONFIG_SINGLECNET"} &&
! $emulabconfig{"CONFIG_GENIRACK"}) {
! $emulabconfig{"CONFIG_TARGETSYS"}) {
mysystem("echo 'ipfw add 10 allow udp from any to 224.0.0.0/4' ".
" >> /etc/rc.local");
}
......@@ -3313,21 +3308,21 @@ sub CreateDefsFile($)
#
# Ug.
#
if ($emulabconfig{"CONFIG_GENIRACK"}) {
$bossnode_ip = $emulabconfig{"GENIRACK_BOSSIP"};
$opsnode_ip = $emulabconfig{"GENIRACK_OPSIP"};
if ($emulabconfig{"CONFIG_TARGETSYS"}) {
$bossnode_ip = $emulabconfig{"TARGETSYS_BOSSIP"};
$opsnode_ip = $emulabconfig{"TARGETSYS_OPSIP"};
$fsnode_ip = $opsnode_ip;
$control_ip = $opsnode_ip;
$control_netmask = $emulabconfig{"GENIRACK_NETMASK"};
$control_netmask = $emulabconfig{"TARGETSYS_NETMASK"};
$bossnode_hostname = "boss";
$opsnode_hostname = "ops";
$fsnode_hostname = "ops";
$ourdomain = $emulabconfig{"GENIRACK_DOMAIN"};
$thishomebase = $emulabconfig{"GENIRACK_HOMEBASE"}
if (defined($emulabconfig{"GENIRACK_HOMEBASE"}));
$cookiesuffix = $emulabconfig{"GENIRACK_HOMEBASE"}
if (defined($emulabconfig{"GENIRACK_HOMEBASE"}));
$router_ip = $emulabconfig{"GENIRACK_ROUTER"};
$ourdomain = $emulabconfig{"TARGETSYS_DOMAIN"};
$thishomebase = $emulabconfig{"TARGETSYS_HOMEBASE"}
if (defined($emulabconfig{"TARGETSYS_HOMEBASE"}));
$cookiesuffix = $emulabconfig{"TARGETSYS_HOMEBASE"}
if (defined($emulabconfig{"TARGETSYS_HOMEBASE"}));
$router_ip = $emulabconfig{"TARGETSYS_ROUTER"};
}
my $control_network = inet_ntoa(inet_aton($control_ip) &
......@@ -3655,23 +3650,33 @@ sub CreateDefsFile($)
print OUTDEFS $_;
}
}
if ($emulabconfig{"CONFIG_PROTOGENI"} ||
$emulabconfig{"CONFIG_GENIRACK"}) {
my $config_genirack = $emulabconfig{"CONFIG_GENIRACK"};
if ($emulabconfig{"CONFIG_TARGETSYS"}) {
my $target = $emulabconfig{"TARGETSYS_TARGET"};
print OUTDEFS "CONFIG_TARGETSYS=1\n";
print OUTDEFS "TARGETSYS_TARGET=\"${target}\"\n";
if ($target eq "GENIRACK") {
print OUTDEFS "PROTOGENI_GENIRACK=1\n";
}
}
if ($emulabconfig{"CONFIG_PROTOGENI"}) {
my $protogeni_domain = lc($thishomebase);
if (defined($emulabconfig{"GENIRACK_HOMEBASE"})) {
$protogeni_domain = lc($emulabconfig{"GENIRACK_HOMEBASE"});
if (defined($emulabconfig{"TARGETSYS_HOMEBASE"})) {
$protogeni_domain = lc($emulabconfig{"TARGETSYS_HOMEBASE"});
}
print OUTDEFS "PROTOGENI_SUPPORT=1\n";
print OUTDEFS "PROTOGENI_GENIRACK=$config_genirack\n";
print OUTDEFS "PROTOGENI_DOMAIN=\"$protogeni_domain\"\n";
print OUTDEFS "FANCYBANNER=1\n";
print OUTDEFS "ISOLATEADMINS=0\n";
if ($emulabconfig{"CONFIG_PORTAL"} && !$config_genirack) {
if ($emulabconfig{"CONFIG_PORTAL"}) {
print OUTDEFS "PORTAL_ENABLE=1\n";
print OUTDEFS "PROTOGENI_ISCLEARINGHOUSE=1\n";
print OUTDEFS "PROTOGENI_LOCALUSER=1\n";
}
if (! ($emulabconfig{"CONFIG_TARGETSYS"} eq "GENIRACK" ||
$emulabconfig{"CONFIG_FEDERATED"})) {
print OUTDEFS "PROTOGENI_ISCLEARINGHOUSE=1\n";
print OUTDEFS "PROTOGENI_WEBSITE=${bossnode_hostname}.${ourdomain}\n";
}
}
......
......@@ -219,6 +219,9 @@
/* Support Protogeni rack */
#undef PROTOGENI_GENIRACK
/* Configure for a target system (like a rack) */
#undef CONFIG_TARGETSYS
/* Support Protogeni */
#undef PROTOGENI_SUPPORT
......
......@@ -739,6 +739,8 @@ GMAP_API_KEY
STANDALONE_CLEARINGHOUSE
PROTOGENI_NICKNAME
PROTOGENI_GENIRACK
CONFIG_TARGETSYS
TARGETSYS_TARGET
PROTOGENI_URL
GENI_PUBRPCPORT
PROTOGENI_NONFSMOUNTS
......@@ -5148,6 +5150,8 @@ PROTOGENI_MAXSERVERLOAD=12
PROTOGENI_NONFSMOUNTS=0
GENI_PUBRPCPORT=12370
PROTOGENI_GENIRACK=0
CONFIG_TARGETSYS=0
TARGETSYS_TARGET=""
PROTOGENI_NICKNAME="unknown"
STANDALONE_CLEARINGHOUSE=0
NODE_USAGE_SUPPORT=0
......@@ -5649,6 +5653,13 @@ cat >>confdefs.h <<_ACEOF
#define PROTOGENI_GENIRACK 1
_ACEOF
fi
if test $CONFIG_TARGETSYS -eq 1; then
cat >>confdefs.h <<_ACEOF
#define CONFIG_TARGETSYS 1
_ACEOF
fi
if test $IMAGEPROVENANCE -eq 1; then
......
......@@ -266,6 +266,8 @@ AC_SUBST(PROTOGENI_URL)
AC_SUBST(PROTOGENI_GENIRACK)
AC_SUBST(PROTOGENI_NICKNAME)
AC_SUBST(STANDALONE_CLEARINGHOUSE)
AC_SUBST(CONFIG_TARGETSYS)
AC_SUBST(TARGETSYS_TARGET)
AC_SUBST(GMAP_API_KEY)
AC_SUBST(NODE_USAGE_SUPPORT)
AC_SUBST(NOSTACKMIB)
......@@ -438,6 +440,8 @@ PROTOGENI_MAXSERVERLOAD=12
PROTOGENI_NONFSMOUNTS=0
GENI_PUBRPCPORT=12370
PROTOGENI_GENIRACK=0
CONFIG_TARGETSYS=0
TARGETSYS_TARGET=""
PROTOGENI_NICKNAME="unknown"
STANDALONE_CLEARINGHOUSE=0
NODE_USAGE_SUPPORT=0
......
......@@ -10,20 +10,23 @@ tb-set-elabinelab-attribute LOAD_PROTOGENI 1
tb-set-elabinelab-attribute CONFIG_NODBINIT 1
tb-set-elabinelab-attribute CONFIG_NOSETUP 0
tb-set-elabinelab-attribute CONFIG_GENIRACK 1
tb-set-elabinelab-attribute GENIRACK_NETWORK 128.82.75.64
tb-set-elabinelab-attribute GENIRACK_NETMASK 255.255.255.192
tb-set-elabinelab-attribute GENIRACK_ROUTER 128.82.75.65
tb-set-elabinelab-attribute GENIRACK_ILOIP 128.82.75.66
tb-set-elabinelab-attribute GENIRACK_CONTROLIP 128.82.75.67
tb-set-elabinelab-attribute GENIRACK_BOSSIP 128.82.75.68
tb-set-elabinelab-attribute GENIRACK_OPSIP 128.82.75.69
tb-set-elabinelab-attribute CONFIG_TARGETSYS 1
tb-set-elabinelab-attribute TARGETSYS_TARGET GENIRACK
tb-set-elabinelab-attribute TARGETSYS_DOMAIN instageni.odu.edu
tb-set-elabinelab-attribute TARGETSYS_NETWORK 128.82.75.64
tb-set-elabinelab-attribute TARGETSYS_NETMASK 255.255.255.192
tb-set-elabinelab-attribute TARGETSYS_ROUTER 128.82.75.65
tb-set-elabinelab-attribute TARGETSYS_BOSSIP 128.82.75.68
tb-set-elabinelab-attribute TARGETSYS_OPSIP 128.82.75.69
# Geni Rack specific stuff.
tb-set-elabinelab-attribute GENIRACK_FOAMIP 128.82.75.70
tb-set-elabinelab-attribute GENIRACK_FLOWIP 128.82.75.71
tb-set-elabinelab-attribute GENIRACK_ILOIP 128.82.75.66
tb-set-elabinelab-attribute GENIRACK_CONTROLIP 128.82.75.67
# Added Utah boss to avoid timeouts during setup.
tb-set-elabinelab-attribute NAMED_FORWARDERS "128.82.254.154,128.82.254.155,155.98.32.70"
tb-set-elabinelab-attribute NAMED_ALSONOTIFY 155.98.32.70
tb-set-elabinelab-attribute GENIRACK_DOMAIN instageni.odu.edu
#tb-set-elabinelab-attribute ROUTABLE_IPRANGE "128.82.75.96-128.82.75.126"
tb-set-elabinelab-attribute GENIRACK_COUNTRY "US"
......@@ -31,13 +34,13 @@ tb-set-elabinelab-attribute GENIRACK_LATITUDE "36.88560"
tb-set-elabinelab-attribute GENIRACK_LONGITUDE "-76.30741"
# Reset to admin email later.
tb-set-elabinelab-attribute GENIRACK_TBOPS "genirack-ops@flux.utah.edu"
tb-set-elabinelab-attribute GENIRACK_TBLOGS "genirack-logs@flux.utah.edu"
tb-set-elabinelab-attribute GENIRACK_TBSTATED "genirack-stated@flux.utah.edu"
tb-set-elabinelab-attribute TARGETSYS_TBOPS "genirack-ops@flux.utah.edu"
tb-set-elabinelab-attribute TARGETSYS_TBLOGS "genirack-logs@flux.utah.edu"
tb-set-elabinelab-attribute TARGETSYS_TBSTATED "genirack-stated@flux.utah.edu"
# We make this stuff up for the site.
tb-set-elabinelab-attribute GENIRACK_HOMEBASE ODU
tb-set-elabinelab-attribute GENIRACK_TIMEZONE America/New_York
tb-set-elabinelab-attribute TARGETSYS_HOMEBASE ODU
tb-set-elabinelab-attribute TARGETSYS_TIMEZONE America/New_York
tb-set-elabinelab-attribute SSLCERT_COUNTRY US
tb-set-elabinelab-attribute SSLCERT_STATE "Virginia"
tb-set-elabinelab-attribute SSLCERT_LOCALITY "Norfolk"
......
......@@ -185,6 +185,7 @@ $PREFIX = $TBROOT;
$MAINSITE = @TBMAINSITE@;
$PGENISUPPORT = @PROTOGENI_SUPPORT@;
$PROTOGENI_GENIRACK = @PROTOGENI_GENIRACK@;
$CONFIG_TARGETSYS = @CONFIG_TARGETSYS@;
$PORTAL_ENABLE = @PORTAL_ENABLE@;
$ELABINELAB = @ELABINELAB@;
$DBNAME = "@TBDBNAME@";
......
......@@ -282,27 +282,27 @@ sub Install($$$)
#
# Latitude/Longitude
#
if (exists($configvars{'GENIRACK_COUNTRY'}) &&
$configvars{'GENIRACK_COUNTRY'} ne "") {
if (exists($configvars{'TARGETSYS_COUNTRY'}) &&
$configvars{'TARGETSYS_COUNTRY'} ne "") {
Phase "sitevar2", "Setting country sitevar", sub {
SetSiteVar("general/default_country",
$configvars{'GENIRACK_COUNTRY'})
$configvars{'TARTGETSYS_COUNTRY'})
or PhaseFail("failed");
};
}
if (exists($configvars{'GENIRACK_LATITUDE'}) &&
$configvars{'GENIRACK_LATITUDE'} ne "") {
if (exists($configvars{'TARGETSYS_LATITUDE'}) &&
$configvars{'TARGETSYS_LATITUDE'} ne "") {
Phase "sitevar3", "Setting latitude sitevar", sub {
SetSiteVar("general/default_latitude",
$configvars{'GENIRACK_LATITUDE'})
$configvars{'TARGETSYS_LATITUDE'})
or PhaseFail("failed");
};
}
if (exists($configvars{'GENIRACK_LONGITUDE'}) &&
$configvars{'GENIRACK_LONGITUDE'} ne "") {
if (exists($configvars{'TARGETSYS_LONGITUDE'}) &&
$configvars{'TARGETSYS_LONGITUDE'} ne "") {
Phase "sitevar4", "Setting longitude sitevar", sub {
SetSiteVar("general/default_longitude",
$configvars{'GENIRACK_LONGITUDE'})
$configvars{'TARGETSYS_LONGITUDE'})
or PhaseFail("failed");
};
}
......@@ -436,8 +436,8 @@ sub Install($$$)
push(@strings,
"network_interfaces=\"\$network_interfaces @ifaces\"");
push(@strings,
"ifconfig_xn0=\"inet ". $configvars{"GENIRACK_BOSSIP"} .
" netmask " . $configvars{"GENIRACK_NETMASK"} . " -tso\"");
"ifconfig_xn0=\"inet ". $configvars{"TARGETSYS_BOSSIP"} .
" netmask " . $configvars{"TARGETSYS_NETMASK"} . " -tso\"");
# Jail network.
push(@strings,
"ifconfig_xn0_alias0=\"inet 172.17.254.254 ".
......@@ -448,7 +448,7 @@ sub Install($$$)
"netmask 255.255.255.0\"");
# Actual default router.
push(@strings,
"defaultrouter=\"" . $configvars{"GENIRACK_ROUTER"} . "\"");
"defaultrouter=\"" . $configvars{"TARGETSYS_ROUTER"} . "\"");
# Going to lose all static routes below, so add this back.
push(@strings,
"static_routes=\"\$static_routes frisbee\"");
......
......@@ -32,6 +32,11 @@ my %NEWIMAGES = (
"FBSD111-64-STD" => "https://www.emulab.net/image_metadata.php?uuid=560f4743-795d-11e7-ac90-90e2ba22fee4"
);
if ($FBSD_MAJOR > 10) {
$LINUXSTDIMAGE = "UBUNTU16-64-STD";
$FBSDSTDIMAGE = "FBSD111-64-STD";
}
#
# Old style mappings, but probably still in use someplace.
#
......
......@@ -26,7 +26,7 @@ sub Install($$$)
Phase "mibs", "Fetching Cisco MIBs", sub {
# Not needed in an inner elab, and it takes a long time.
PhaseSkip("Not needed in ELABINELAB")
if ($ELABINELAB && !$PROTOGENI_GENIRACK);
if ($ELABINELAB && !$CONFIG_TARGETSYS);
foreach my $mib (@CISCO_MIBS) {
my $localfile = "$MIBPATH/$mib.txt";
......@@ -40,7 +40,7 @@ sub Install($$$)
Phase "hpmibs", "Fetching HP MIBs", sub {
# Not needed in an inner elab, and it takes a long time.
PhaseSkip("Not needed in ELABINELAB")
if ($ELABINELAB && !$PROTOGENI_GENIRACK);
if ($ELABINELAB && !$CONFIG_TARGETSYS);
foreach my $mib (@HP_MIBS) {
my $localfile = "$MIBPATH/$mib.txt";
......
......@@ -30,8 +30,8 @@ sub Install($$$)
" $WAP $CREATETYPE $NODETYPEXML");
};
# Do not run this in a genirack setup; must wait till later.
if (!$PROTOGENI_GENIRACK) {
# Do not run this in a targetsys setup; must wait till later.
if (!$CONFIG_TARGETSYS) {
Phase "adding", "Adding control nodes", sub {
PhaseSkip("already added")
if (defined(Node->Lookup("ops")));
......
......@@ -62,8 +62,8 @@ sub Install($$$)
" StrictHostKeyChecking no",
" Protocol 2");
};
# GPO wants password authentication turned off.
if ($PROTOGENI_GENIRACK) {
# We should probably turn off password authentication all the time.
if ($CONFIG_TARGETSYS) {
Phase "sshdconfig", "Turning off password authentication", sub {
DoneIfEdited($SSHD_CONFIG);
......
......@@ -9,9 +9,9 @@ sub Install($$$)
{
my ($server, $isupdate, $impotent) = @_;
# Do not run this in a genirack setup; must wait till later.
# Do not run this in a targetsys setup; must wait till later.
return 0
if ($PROTOGENI_GENIRACK && !$isupdate);
if ($CONFIG_TARGETSYS && !$isupdate);
#
# Initialize server IP/MAC sitevars (for ARP lockdown).
......
......@@ -130,8 +130,8 @@ sub Install($$$)
closedir(DIR);
my @default = "genirack-ops\@flux.utah.edu";
if (exists($configvars{"GENIRACK_TBOPS"})) {
@default = split(",", $configvars{"GENIRACK_TBOPS"});
if (exists($configvars{"TARGETSYS_TBOPS"})) {
@default = split(",", $configvars{"TARGETSYS_TBOPS"});
}
foreach my $list (@lists) {
my @where = @default;
......@@ -146,12 +146,12 @@ sub Install($$$)
Phase "emaillist", "Changing target for $list", sub {
if ($list eq "testbed-logs" || $list eq "testbed-audit") {
@where = split(",", $configvars{"GENIRACK_TBLOGS"})
if (exists($configvars{"GENIRACK_TBLOGS"}));
@where = split(",", $configvars{"TARGETSYS_TBLOGS"})
if (exists($configvars{"TARGETSYS_TBLOGS"}));
}
elsif ($list eq "testbed-stated") {
@where = split(",", $configvars{"GENIRACK_TBSTATED"})
if (exists($configvars{"GENIRACK_TBSTATED"}));
@where = split(",", $configvars{"TARGETSYS_TBSTATED"})
if (exists($configvars{"TARGETSYS_TBSTATED"}));
}
AppendToFileFatal($fname, @where);
};
......@@ -179,15 +179,15 @@ sub Install($$$)
my @strings = ();
push(@strings,
"ifconfig_xn0=\"inet ". $configvars{"GENIRACK_OPSIP"} .
" netmask " . $configvars{"GENIRACK_NETMASK"} . " -tso\"");
"ifconfig_xn0=\"inet ". $configvars{"TARGETSYS_OPSIP"} .
" netmask " . $configvars{"TARGETSYS_NETMASK"} . " -tso\"");
# Actual default router.
push(@strings,
"defaultrouter=\"" . $configvars{"GENIRACK_ROUTER"} . "\"");
"defaultrouter=\"" . $configvars{"TARGETSYS_ROUTER"} . "\"");
# Going to lose all static routes below, so add this back.
push(@strings,
"syslogd_flags=\"-a " .
$configvars{"GENIRACK_NETWORK"} . "/24\"");
$configvars{"TARGETSYS_NETWORK"} . "/24\"");
# Jail network.
push(@strings,
"ifconfig_xn0_alias0=\"inet 172.17.253.254 ".
......
......@@ -24,8 +24,8 @@ sub Install($$$)
my @strings = ("PermitRootLogin yes",
"Protocol 2");
# GPO wants this turned off.
if ($PROTOGENI_GENIRACK) {
# We should probably do this all the time
if ($CONFIG_TARGETSYS) {
ExecQuietFatal("sed -i.orig ".
" -e 's/PasswordAuth/#PasswordAuth/' ".
" -e 's/PermitRootLogin/#PermitRootLogin/' ".
......
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -38,7 +38,7 @@ sub usage {
# Configure variables
#
my $OURDOMAIN = "@OURDOMAIN@";
my $PROTOGENI_GENIRACK = @PROTOGENI_GENIRACK@;
my $CONFIG_TARGETSYS = @CONFIG_TARGETSYS@;
my ($BOSSTOKEN) = ("@BOSSNODE@" =~ /^([-\w]+).*$/);
my ($USERTOKEN) = ("@USERNODE@" =~ /^([-\w]+).*$/);
my ($FSTOKEN) = ("@FSNODE@" =~ /^([-\w]+).*$/);
......@@ -211,7 +211,7 @@ while (<IF>) {
if (isroutable($CONTROL_ROUTER_IP));
}
elsif ($2 eq "secondaries") {
if ($PROTOGENI_GENIRACK) {
if ($CONFIG_TARGETSYS) {
my $foo = " IN NS ns.emulab.net.\n";
$internal_strings .= $foo;
......
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -38,7 +38,7 @@ sub usage {
# Configure variables
#
my $ELABINELAB = "@ELABINELAB@";
my $PROTOGENI_GENIRACK = @PROTOGENI_GENIRACK@;
my $CONFIG_TARGETSYS = @CONFIG_TARGETSYS@;
my $OURDOMAIN = "@OURDOMAIN@";
my $TESTBED_NETWORK = "@TESTBED_NETWORK@";
my $TESTBED_NETMASK = "@TESTBED_NETMASK@";
......@@ -101,7 +101,7 @@ for (my $i = $jb; $i <= $jb + (255 - $jmb); $i++) {
system("cp -f reverse.head $internal_revfile") == 0 or
die("Unable to copy $infile to $internal_revfile\n");
if ($PROTOGENI_GENIRACK) {
if ($CONFIG_TARGETSYS) {
system("echo ' IN NS ns.emulab.net.' >> $internal_revfile");
}
......@@ -145,7 +145,7 @@ for (my $i = $ic; $i <= $ic + (255 - $imc); $i++) {
system("cp -f reverse.head $internal_revfile") == 0 or
die("Unable to copy $infile to $internal_revfile\n");
if ($PROTOGENI_GENIRACK) {
if ($CONFIG_TARGETSYS) {
system("echo ' IN NS ns.emulab.net.' >> $internal_revfile");
}
......
......@@ -59,7 +59,6 @@ my $PROTOGENI_RPCNAME = "@PROTOGENI_RPCNAME@";
my $PROTOGENI_RPCPORT = "@PROTOGENI_RPCPORT@";
my $OUTERBOSS_XMLRPCPORT = "@OUTERBOSS_XMLRPCPORT@";
my $PROTOGENI_WEBSITE = "@PROTOGENI_WEBSITE@";
my $PROTOGENI_GENIRACK = @PROTOGENI_GENIRACK@;
my $PROTOGENI_URL = "@PROTOGENI_URL@";
my $geniuserid = "geniuser";
my $geniprojid = "GeniSlices";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment