Windows Service installation on Docker Container - containers

I am trying to port one of our Tomcat based Windows application to Windows Nano Server Container. The installation process includes two Windows Service installations - an ActiveMQ service and another Tomcat Service. This is achieved using two batch files provided with the product. In addition to installing the service, they also pass several arguments pertaining to JVM. Now the issue I am facing is I am not able to get these services installed on a Nano Server. The same Dockerfile works perfect and installs the product on Windows Server Core Container.
Observation: The services which get installed through batch files are dependent on two system components - Ancillary Function Driver for Winsock (Service name: afd) and TCP/IP Protocol Driver (Service Name: tcpip). This is something which I discovered on a VM where the product was installed when checking the service properties. I see that they are absent in a Nano Server Container but are present in Windows Server Core container. Could that be a reason? If yes, is there any way to get those services running on Nano Server?
I am at a loss on how to troubleshoot this issue. Are there any limitations on Nano Server Container when it comes to Windows Services?

Consider building your docker container from the ground up,
Determine and set your prerequisites
Install all of the dependencies first
Install the application and services in question
(For additional information you can look at this wiki page.)
The Nano server container is minimal and misses many windows default services, you’ll have to build most of them through Dockerfile yourself.
The easiest method will be to do this manually on Nano server and confirm everything to be working in the docker container/image, and then later generate an automated build.

Related

Add a Windows node to Openshift OKD v.3.11

Since Docker can now run on Windows, is there a way to deploy Openshift OKD over a Windows VM?
In the documentation under System and environment requirements we can read that rhel family OS are needed, but I'm just wondering if there is a side process (alternative) process to perform this operation.
My main concern is that I need to run Windows containers on OKD.
The answer is that for OKD 3.11 this is not possible and has to do with the networking (OVS) not being available for Windows machines.
That being said, there is a lot of information available for Windows Container in Kubernetes itself, although there are A LOT of things that are not implemented or are not supported at this time: https://kubernetes.io/docs/setup/production-environment/windows/intro-windows-in-kubernetes/
You can expect Windows Containers to become available in OKD 4.5 or later as Tech Preview, but I personally would not hold my breath.

SQL adapter in Worlight?

I am new to IBM Worklight,and i found a way to connect to the MySQL using the SQL adapter.
the configuration as below:
<dataSourceDefinition>
<driverClass>com.mysql.jdbc.Driver</driverClass>
<url>jdbc:mysql://localhost:3306/worklight_training</url>
<user>Worklight</user>
<password>Worklight</password>
</dataSourceDefinition>
Since the adapter are compile together with the app, just wondering, is it safe? is there a possibility of someone decompiling my apk or ipa to view the adapter connection thus acquire the user and password to my mysql database.
A hacker decompiling your .apk or .ipa file will not find the database username/password there, for the simple reason that the adapter is not compiled "together with the app" and is not part of any artifacts that you install in a device.
An adapter is a server-side entity, not client-side.
The adapter is an object stored in the memory of the running application server.
Adapters are Server side code andare not part of the apk or ipa files.
You can check/confirm this information in Worklight documentation. The details about adapters, under "Developing the server side of a Worklight Application" are at:
http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/devref/c_overview_of_ibm_worklight_adap.html
You can also check the Server Side Development of MobileFirst Platform Getting Started Modules
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/server-side-development/
(MobileFirst Platform is the new name of Worklight)
In worklight, you usually have the application (apk/ipa) communicating with a server side component (the adapters) running in a worklight server. The adapters are used to communicate with backend systems (like a mysql server). There are a few different types of adapters to communicate with different types of backends (like sql, http and SAP)
Please, let us know what documentation/guide caused you the understanding that adapters are part of the client apk/ipa. If that is really stated in any documentation, it is wrong and must be corrected.
Edit:
To connect to a MySQL DB (no matter if it is a standalone MySQL or in XAMP, LAMP or whatever package) you can follow this geting started tutorial
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/server-side-development/sql-adapter-communicating-sql-database/
Also note that, if you are using MobileFirst Studio (previously Worklight Studio) downloaded for free from Developer Works you have a developer version of the WOrklight Server running inside Studio so that you can create and deploy adapters and use it during development as your server. But when you go to production you are required to purchase licenses of Worklight because you don't have the worklight server available for free.
So if you have Studio, you have the server available but only for development purposes.

Is a MongoDB database installed on a server?

I just started using MongoDB and Node.js with a MEAN Stack (MongoDB, Express, AngularJS, Node.js) on my local machine and at first I assumed that MongoDB was installed on the Node.js server kind of like MySQL is installed on Apache when you install the LAMP or WAMP stack.
But now I'm not so sure any more :)
How does it work? Where is MongoDB installed? Can I use it without Node.js? Can I use MySQL without a server?
Both MongoDB and MySQL are installed standalone on the host (in your case localhost).
MySQL is not installed on Apache. It's just the PHP interface to MySQL which requires Apache to serve it. You can use the MySQL command line (issue the mysql command in your shell console) without having Apache or PHP installed. The LAMP and WAMP stacks ship with the PHP MySQL interface configured.
MEAN is a similar stack, consisting of each individual component available independently as well as knit together seamlessly as per requirement. You can query a MongoDB hosted on a different machine from the machine you have the MEAN stack on too.

Can I keep MYSQL and WAMP Server running together?

At first, I use Struts 2 to develop a website in Java web technology. So I installed Apache Tomcat as the localhost server and MYSQL as the database (MYSQL here is the full application from mysql.com, not the packages like XAMPP or WAMP...)
But now I switch to learn a little bit about PHP so I install WAMP full package. When I start all services of WAMP and go to browser and type localhost, everything work fine
But when I go to localhost/phpmyadmin, it seems to connect to the old MYSQL application in my computer (what I've used in Java web). And then I restart computer and use MYSQL Workbench (in the MYSQL application), but now it connects to the database of WAMP package, and I can not connect to the old database (in Java web) anymore
The solution is remove WAMP but I need WAMP for PHP
So I just want to ask how can I use MYSQL application and WAMP package together (MYSQL application for Java web and WAMP package for PHP)?
Thank you and apology for my bad English!
Go to C:\Program Files (x86)\MySQL\MySQL Server 5.1 and open my (Configuration file) and then navigate to
[client]
port=3306
Change this to
[client]
port:3307
This will make phpmyadmin to run on 3306 and Java-Mysql to run on 3307
You can of course keep both XAMPP and WAMP running together keeping in mind that you have changed the default ports for either of it to some other ports rather than 80,443 and 3306, but sometimes it could create conflict as when you install some other third party softwares or enable certain services that run on port 80,443,3306.
The best alternative here would be to install one of the servers inside a virtual machine with network configured as "host-only-adapter" so that from the base machine you could access XAMPP/WAMP installed on the virtual machine by just pointing the ip-address of the virtual machine through a web-browser.
or,
If you want to run both XAMPP and WAMP together on the same machine but access only one of the servers at a time then you could go ahead installing both of them one after another. But, keep in mind that before installing the other server you have to completely stop all the services running from the XAMPP or WAMP control panel then quit the application. After this step you can go ahead installing the other server without changing any configurations or port numbers. This is because in this case we assumed that only one of the servers would be accessed at a time. Hence, before launching the other server one has to completely quit the application that is running currently by stopping all of it's services. If skype is installed then one has to change the default incoming connection ports to other than port 80 and 443.
Like mentioned above, if at all the intention is to access both servers up and running concurrently then taking advantage of a virtual machine would be the best to avoid conflicts and a long-term troubleshoots eventually.
If you messed up changing ports and config files then you could end up with the following error while trying to access phpmyadmin from XAMPP control panel:
**mysql said: Cannot connect: invalid settings. xampp**
note: while launching the servers , run it as administrator else some services will not start properly.
"I TRIED INSTALLING BOTH XAMPP AND WAMP ON WINDOWS 10 AS SUCH AS POINTED BY MANY THREADS I CHANGED THE DEFAULT PORTS FOR MYSQL & APACHE XAMPP AS IT WOULD CONFLICT WITH WAMP ALREADY INSTALLED ONLY ENDING UP UNABLE TO ACCESS PHPMYADMIN FROM XAMPP CONTROL PANEL. THEN REINSTALLED XAMPP WITHOUT CHANGING ANY CONFIGS OR PORTS. STOP THE WAMP SERVICES, QUIT THE APP AND THEN LAUNCH PHPMYADMIN FROM XAMPP CONTROL PANEL. AT LAST IT WORKED!. THE PROCESS LOOKS SHORT THOUGH WHEN IN REALITY IT TOOK ME COUNTLESS HOURS AND PAIN RESEARCHING ON THE WEB AND TESTING FOR A POSSIBLE SOLUTION UNTILL I CAME UP WITH THIS."
Hopes, this quick tips and guides would be helpful.

What do I have to be aware of when installing Reporting Services on a productive SQL Server 2008

I have a running sql server installation on which I would like to install the reporting services module. Now because it is very important that the sql server it self keeps available and running without any interruptions I get a little scary about this step.
Now my question. Are there any pittfalls I have to be aware of before I install the module? E.g. does the server restart during the installation?
Can you try this change in a virtual machine first?
For example, use the Disk2vhd application (http://technet.microsoft.com/en-us/sysinternals/ee656415.aspx) to make a snapshot of your current production system. Then, use the VHD that was created in Microsoft Virtual PC, Hyper-V, or Windows 7 native VHD boot.
If you try a virtual machine for testing, disable networking or create a private network before starting the virtual machine! Having two servers with the same name and SID on your network is a Bad Thing.
(If you're not using virtual machines, isn't it time? :)