Author: sandervanderburg Date: 2010-06-10 12:25:00 +0000 (Thu, 10 Jun 2010) New Revision: 22208
You can view the changes in this commit at: https://svn.nixos.org/viewvc/nix?rev=22208&view=rev Added: disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/network.nix disnix/examples/HelloWorldExample/trunk/deployment/configurations/ disnix/examples/HelloWorldExample/trunk/deployment/configurations/mysqlpw disnix/examples/HelloWorldExample/trunk/deployment/configurations/mysqlscript disnix/examples/HelloWorldExample/trunk/deployment/configurations/test-vm1.nix disnix/examples/HelloWorldExample/trunk/deployment/configurations/test-vm2-mysql.nix Modified: disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/distribution.nix disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services.nix disnix/examples/HelloWorldExample/trunk/deployment/pkgs/HelloDBService/default.nix disnix/examples/HelloWorldExample/trunk/deployment/pkgs/HelloService/default.nix disnix/examples/HelloWorldExample/trunk/deployment/pkgs/HelloWorldService2/default.nix disnix/examples/HelloWorldExample/trunk/services/HelloService/build.xml Log: - Fixed some dumb refactoring bugs - Added a network model Changes: Modified: disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/distribution.nix =================================================================== --- disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/distribution.nix 2010-06-10 10:48:30 UTC (rev 22207) +++ disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/distribution.nix 2010-06-10 12:25:00 UTC (rev 22208) @@ -5,8 +5,7 @@ {infrastructure}: { - HelloMySQLDB = [ infrastructure.test2 ]; - HelloDBService = [ infrastructure.test1 ]; + HelloService = [ infrastructure.test1 ]; HelloWorldService = [ infrastructure.test2 ]; HelloWorld = [ infrastructure.test1 ]; } Added: disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/network.nix =================================================================== --- disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/network.nix (rev 0) +++ disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/network.nix 2010-06-10 12:25:00 UTC (rev 22208) @@ -0,0 +1,4 @@ +{ + test1 = import ../configurations/test-vm1.nix; + test2 = import ../configurations/test-vm2-mysql.nix; +} Modified: disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services.nix =================================================================== --- disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services.nix 2010-06-10 10:48:30 UTC (rev 22207) +++ disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services.nix 2010-06-10 12:25:00 UTC (rev 22208) @@ -26,8 +26,7 @@ name = "HelloWorldService"; pkg = pkgs.HelloWorldService; dependsOn = { - #inherit HelloService; - HelloService = HelloDBService; + inherit HelloService; }; type = "tomcat-webapplication"; }; Added: disnix/examples/HelloWorldExample/trunk/deployment/configurations/mysqlpw =================================================================== --- disnix/examples/HelloWorldExample/trunk/deployment/configurations/mysqlpw (rev 0) +++ disnix/examples/HelloWorldExample/trunk/deployment/configurations/mysqlpw 2010-06-10 12:25:00 UTC (rev 22208) @@ -0,0 +1 @@ +admin \ No newline at end of file Added: disnix/examples/HelloWorldExample/trunk/deployment/configurations/mysqlscript =================================================================== --- disnix/examples/HelloWorldExample/trunk/deployment/configurations/mysqlscript (rev 0) +++ disnix/examples/HelloWorldExample/trunk/deployment/configurations/mysqlscript 2010-06-10 12:25:00 UTC (rev 22208) @@ -0,0 +1 @@ +grant all on *.* to 'root'@'%' identified by ''; Added: disnix/examples/HelloWorldExample/trunk/deployment/configurations/test-vm1.nix =================================================================== --- disnix/examples/HelloWorldExample/trunk/deployment/configurations/test-vm1.nix (rev 0) +++ disnix/examples/HelloWorldExample/trunk/deployment/configurations/test-vm1.nix 2010-06-10 12:25:00 UTC (rev 22208) @@ -0,0 +1,51 @@ +{pkgs, ...}: + +{ + boot = { + loader = { + grub = { + device = "/dev/sda"; + }; + }; + }; + + fileSystems = [ + { mountPoint = "/"; + device = "/dev/sda2"; + } + ]; + + swapDevices = [ + { device = "/dev/sda1"; } + ]; + + services = { + openssh = { + enable = true; + }; + + disnix = { + enable = true; + }; + + tomcat = { + enable = true; + + commonLibs = [ "${pkgs.mysql_jdbc}/share/java/mysql-connector-java.jar" ]; + + javaOpts = "-Djava.library.path=${pkgs.libmatthew_java}/lib/jni"; + catalinaOpts = "-Xms64m -Xmx256m"; + sharedLibs = [ "${pkgs.DisnixService}/share/java/DisnixConnection.jar" + "${pkgs.dbus_java}/share/java/dbus.jar" ]; + webapps = [ pkgs.DisnixService ]; + }; + }; + + environment = { + systemPackages = [ + pkgs.mc + pkgs.subversion + pkgs.lynx + ]; + }; +} Added: disnix/examples/HelloWorldExample/trunk/deployment/configurations/test-vm2-mysql.nix =================================================================== --- disnix/examples/HelloWorldExample/trunk/deployment/configurations/test-vm2-mysql.nix (rev 0) +++ disnix/examples/HelloWorldExample/trunk/deployment/configurations/test-vm2-mysql.nix 2010-06-10 12:25:00 UTC (rev 22208) @@ -0,0 +1,57 @@ +{pkgs, ...}: + +{ + boot = { + loader = { + grub = { + device = "/dev/sda"; + }; + }; + }; + + fileSystems = [ + { mountPoint = "/"; + device = "/dev/sda2"; + } + ]; + + swapDevices = [ + { device = "/dev/sda1"; } + ]; + + services = { + openssh = { + enable = true; + }; + + disnix = { + enable = true; + }; + + mysql = { + enable = true; + rootPassword = ./mysqlpw; + initialScript = ./mysqlscript; + }; + + tomcat = { + enable = true; + + commonLibs = [ "${pkgs.mysql_jdbc}/share/java/mysql-connector-java.jar" ]; + + javaOpts = "-Djava.library.path=${pkgs.libmatthew_java}/lib/jni"; + catalinaOpts = "-Xms64m -Xmx256m"; + sharedLibs = [ "${pkgs.DisnixService}/share/java/DisnixConnection.jar" + "${pkgs.dbus_java}/share/java/dbus.jar" ]; + webapps = [ pkgs.DisnixService ]; + }; + }; + + environment = { + systemPackages = [ + pkgs.mc + pkgs.subversion + pkgs.lynx + ]; + }; +} Modified: disnix/examples/HelloWorldExample/trunk/deployment/pkgs/HelloDBService/default.nix =================================================================== --- disnix/examples/HelloWorldExample/trunk/deployment/pkgs/HelloDBService/default.nix 2010-06-10 10:48:30 UTC (rev 22207) +++ disnix/examples/HelloWorldExample/trunk/deployment/pkgs/HelloDBService/default.nix 2010-06-10 12:25:00 UTC (rev 22208) @@ -8,7 +8,7 @@ AXIS2_WEBAPP = "${axis2}/webapps/axis2"; buildPhase = "ant generate.war"; installPhase = '' - ensureDir $out/webapps/axis2 - cp *.war $out/webapps/axis2 + ensureDir $out/webapps + cp *.war $out/webapps ''; } Modified: disnix/examples/HelloWorldExample/trunk/deployment/pkgs/HelloService/default.nix =================================================================== --- disnix/examples/HelloWorldExample/trunk/deployment/pkgs/HelloService/default.nix 2010-06-10 10:48:30 UTC (rev 22207) +++ disnix/examples/HelloWorldExample/trunk/deployment/pkgs/HelloService/default.nix 2010-06-10 12:25:00 UTC (rev 22208) @@ -7,7 +7,7 @@ AXIS2_WEBAPP = "${axis2}/webapps/axis2"; buildPhase = "ant generate.war"; installPhase = '' - ensureDir $out/webapps/axis2 - cp *.war $out/webapps/axis2 + ensureDir $out/webapps + cp *.war $out/webapps ''; } Modified: disnix/examples/HelloWorldExample/trunk/deployment/pkgs/HelloWorldService2/default.nix =================================================================== --- disnix/examples/HelloWorldExample/trunk/deployment/pkgs/HelloWorldService2/default.nix 2010-06-10 10:48:30 UTC (rev 22207) +++ disnix/examples/HelloWorldExample/trunk/deployment/pkgs/HelloWorldService2/default.nix 2010-06-10 12:25:00 UTC (rev 22208) @@ -17,7 +17,7 @@ ant generate.war ''; installPhase = '' - ensureDir $out/webapps/axis2 - cp *.war $out/webapps/axis2 + ensureDir $out/webapps + cp *.war $out/webapps ''; } Modified: disnix/examples/HelloWorldExample/trunk/services/HelloService/build.xml =================================================================== --- disnix/examples/HelloWorldExample/trunk/services/HelloService/build.xml 2010-06-10 10:48:30 UTC (rev 22207) +++ disnix/examples/HelloWorldExample/trunk/services/HelloService/build.xml 2010-06-10 12:25:00 UTC (rev 22208) @@ -46,7 +46,7 @@ <!-- Generates a Web application archive containing an Axis2 container and the Axis2 archive --> <target name="generate.war" depends="generate.service.aar"> - <war destfile="DisnixService.war" needxmlfile="false"> + <war destfile="HelloService.war" needxmlfile="false"> <fileset dir="${AXIS2_WEBAPP}" /> <fileset dir="${deploybuild.dir}" includes="WEB-INF/services/HelloService.aar" /> </war> _______________________________________________ nix-commits mailing list [email protected] http://mail.cs.uu.nl/mailman/listinfo/nix-commits
