ibm-datapower / appliance-management-center

7 stars 6 forks source link

WAMC Installation #7

Open hila3000 opened 8 years ago

hila3000 commented 8 years ago

hey,

i tried installing WAMC. i deployed the Apache Tomee but i can't seem to figure out how to deploy the WAMC into it. i'm running on Windows.

please advise. Thanks Hila hilavalensia@gmail.com

willeje commented 8 years ago

Just follow the Quick Start guide on Code tab. Worked for me... If you still encounter issues, please detail in which step.

hila3000 commented 8 years ago

hey,

thanks for the quick reply. i tried following the quick start, but failed :(

  1. download the zip and unzip, or git clone - Done
  2. cd amc - I assume it's "src\main\java\com\ibm\amc" path of the wamc open source zip.. Done, but haven't used this path since then.
  3. mvn clean package - NOT done. there is no such command in CMD.. what is it?
  4. copy the files under src/main/tomee/conf to the Apache Tomee conf directory - Done
  5. edit the Apache Tomee conf/server.xml and enable SSL per instructions- Done
  6. copy the Maven output target/amc.war into the Apache Tomee webapps directory - NOT done and stuck basically here.. how do i copy the wamc application to the tomee ? there is no war file in the wamc zip file..
ghost commented 8 years ago

Do you have Apache Maven installed and part of your Windows PATH variable?

You will need to make sure that the appliance-management-toolkit is built first, so please clone the http://github.com/ibm-datapower/appliance-management-toolkit project and follow the instructions to build and it locally install it in your Maven repository.

Then you should be able to build the appliance-management-center. Let me know if this works and I will update the instructions.

hila3000 commented 8 years ago

I have Apache Tomee, not Apache Maven.. what is it? that's, perhaps, the reason why I didn't know what to do with the toolkit as well.. where can I download Apache Maven? what is it for?

ghost commented 8 years ago

Maven is used to build and package the code. You can find it here:

https://maven.apache.org/

hila3000 commented 8 years ago

I'll try to work with that and update you (I think you should add Maven as well, under the prerequisites section). Thanks for the support!

hila3000 commented 8 years ago

Hey, so I've installed maven and it's part of my Windows PATH variable. Also the toolkit project is now installed inside maven as well (BUILD SUCCESS) how do I proceed from here? need to run "mvn install" from path "D:\Program Files\appliance-management-center-master\src\main\java\com\ibm\amc"?

Thanks again Hila

ghost commented 8 years ago

Just follow the steps from the main page. If it is not working, please provide more details on what's not working.

hila3000 commented 8 years ago

so it's basically the same as posted before-.

  1. download the zip and unzip, or git clone - Done
  2. cd amc - I assume it's "D:\Program Files\Appliance Management Center\src\main\java\com\ibm\amc" of the wamc center folder extracted from the zip.. Done
  3. mvn clean package - NOT done. running "mvn clean package" from path "D:\Program Files\Appliance Management Center\src\main\java\com\ibm\amc" says "BUILD FAILURE. The goal you specified requires a project to execute but there is no POM in this directory (D:\Program Files\Appliance Management Center\src\main\java\com\ibm\amc). Please verify you invoked Maven from the correct directory".
  4. copy the files under src/main/tomee/conf to the Apache Tomee conf directory - Done
  5. edit the Apache Tomee conf/server.xml and enable SSL per instructions - Done
  6. copy the Maven output target/amc.war into the Apache Tomee webapps directory - NOT done. and stuck basically here.. how do i copy the wamc application to the tomee ? there is no war file in the wamc zip file..

I have maven, i installed the toolkit.. it's not clear from the steps how do I install the wamc center. need to run "mvn install" from path "D:\Program Files\appliance-management-center-master\src\main\java\com\ibm\amc" if not.. then what should I do?

willeje commented 8 years ago

step 2: cd amc means top level directory (where the pom.xml file exist.) In your case probably "Appliance Management Center"

hila3000 commented 8 years ago

Works. thanks! I got to a login page, yay :)

Thanks a lot :)

ghost commented 8 years ago

Look at the catalina.out file under the Apache Tomee logs directory for any clues or attach it here.

hila3000 commented 8 years ago

already managed, that's why I edited my comment. thanks :)

hila3000 commented 8 years ago

hey, I worked with the tool once or twice while I was still logged on, all good. then, after a restart, the service still listened on port 8443 but I couldn't accessed https://localhost:8443/amc nor https://8443 (expected to see apache tomee home page). nothing on logs. then, I just ran the startup.bat from "Apache Tomee JaxRS" bin folder, and then it worked, the wamc tool is accessible again via the site. Is it the only way to run the tool, only when running the startup.bat? as long as the cmd with the startup.bat is opened, the tool will be accessible.. but I want to run it without any cmd windows opened. can it be run without it? wrap it somehow? i thought the apache tomee service is enough (path to executable- D:\Program Files\Apache Tomee JaxRS\bin\TomEE.amd64.exe" //RS//Tomee), but the service was always up and the site isn't up- only when running the startup.bat script.

Thanks Hila

ghost commented 8 years ago

Take a look at the Apache Tomcat instructions here:

https://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html

Look at the installing services section but use TomEE.amd64.exe instead of tomcat7 (or use the service.bat script). Once you install the service, you can start it via Services control panel or via net start <service_name>

hila3000 commented 8 years ago

Hey,

The NT service of TomEE was already installed, but just for the kick of it I removed and installed it again using the service.bat script. This is the path to executable of the service: "D:\Program Files\Apache Tomee JaxRS\bin\TomEE.amd64.exe" //RS//TomEE

And still, same issue- when the NT service is up, the server listens on port 8443 but i can't browse https://localhost:8443/amc. Only when I stop the NT service and run the bin\startup.bat script, then i'm able to browse https://localhost:8443/amc - as long as the cmd window in which the startup.bat runs is opened.

I want to avoid using the startup.bat but the NT service, though allows the server to listen on port 8443, doesn't allow me to browse https://localhost:8443/amc. it seems that the service is ok- if amc folder doesn't exist, when starting the NT service it deploys the amc folder from the amc.war. so I don't understand why the site is available on when the service runs via startup.bat and not via the NT service.

Thanks Hila