Monday, June 27, 2016

Google Cloud Appengine for Python - installation on Windows and create application



Google Cloud Appengine for Python - installation on Windows.
Also to create first application.

1. Go to the Google App Engine download page and download the windows installer under "Google App Engine SDK for python"

https://cloud.google.com/appengine/downloads




2. To install the SDK on Windows:

  1. Double-click the SDK file you downloaded (GoogleAppEngine-1.9.38.msi) and follow the prompts to install the SDK.
  2. You will need Python 2.7 to use the App Engine SDK, because the Development Server is a Python application. Download Python 2.7.X (don't use a higher version) from the Python web site. 

3.   Double-click the SDK file you downloaded (GoogleAppEngine-1.9.38.msi), if python installation is dected, click next
      
  If python is not installed , install python using the instruction in following url :
http://e-systemadministrator.blogspot.sg/2016/06/install-python-27-and-django-in-windows.html






4. Select destination folder


5. Proceed and complete the installation


6. To Create an Application, open the Google App Engine Launcher and


7.  Go to,  File --> Create New Application



8.  Fill in the Application Name, location for the source code. Also select the application port and admin port (We can set the ports as required). Here I have changed my admin port to 8001,.

And click create to create the application.


9.  To start the website, select the website and click run.



You can access the website using the url: http://localhost:8080


Friday, June 24, 2016

Install Eclipse for Python and Django in Windows




1. First Python need to be installed on the Windows OS.

Please refer to the following link on how Install Python on the Windows OS.

http://e-systemadministrator.blogspot.sg/2016/06/install-python-27-and-django-in-windows.html



2. Go to Eclipse download page and go to "Get Eclipse Neon"  and download installation exe file.

https://eclipse.org/downloads/




3. Click installer file to start installing the Eclipse.

4.  Select "Eclipse IDE for PHP Developers"





5. Select the Installation location.





6.  Wait till the installation is completed.

7.  Now we need to Install Pydev, so that we can use Python and Djano using Eclipse.
    For this open the Eclipse and go to help  Eclipse Marketplace.  



8.  In the find box type "PyDev" and click Go.
     And install "PyDev - Python IDE for Eclipse 5.0".




9.  Select the "PyDev" packages and click confirm to install



10.   Wait for the installation to completed. Click and accept the certificates when prompted.



11. Now go to Windows - Preferences



12. On the RHS of the window Go to PyDev -->  Interpreters --> Python Interpreter
And on the LHS click on "Quick Auto-Config"





13. Now the python and django will be added and now we can start programming.






Thursday, June 23, 2016

Windows 2003/2008 - find os installation date



Windows 2003/2008 - find os installation date

Go to
                 start -> run --> cmd


And from the command prompt run the following command

                  systeminfo | find /i "install date"



Thursday, June 16, 2016

Install Python 2.7 and Django in Windows 7




1.  Go to https://www.python.org/downloads/ and download python 2.7 version
      And run the installer to star installation.





2.  Select the installation directory





3. Select the features you want to be installed.




4.  Go ahead with next buttons and completed the installation.




5. Go to system properties --> Advanced --> Environment Variables --> System Variables
   and select PATH and click "Edit".
   If the installation path selected in Step 2 is not there, then add it.
   In this installation the paths are  C:\Python27\;C:\Python27\Scripts;







6. To confirm the installation go to cmd prompt and type ,

               python --version

   and it will show installed python version




7. Now to install djangogo to django page and download the tar file


After that unzip the .tar.gz file



8.  Now go to the django directory and run the following command to install django

                 python setup.py install










9.  To check the django installation is working, go to python shell and use following commands

                import django
                django.get_version()









Wednesday, June 1, 2016

Puppet Agent install and configuration on CentOS/Redhat



1. Download the puppet agent from http://puppet.com
      or go directly to https://puppet.com/download-puppet-enterprise/thank-you

2. Upload the rpm file to the server and run

     rpm -ivh puppet-agent<version>.rpm



Note: Here I am using Centos 6.5 -  64bits OS


3. Configure puppet agent to point to the master server.
 3.1   Open the file /etc/puppetlabs/puppet/puppet.conf and add the following entires


[main]
certname = puppetclient1.com
server = puppetmaster.com
environment = production
runinterval = 1h


3.2 Run puppet agent -t from the client






3.3 Accept the client cert from the Puppet master server

Friday, May 27, 2016

Installing Puppet Enterprise on Linux server

Installing Puppet Enterprise on Linux server



1.  Go to https://puppet.com/ and download the .tar.gz Puppet enterprise master and Agent installation      files.


2.  Upload the puppet-enterprise tar.gz file to the Puppet Master Server.
     Here we are using a server installed with CentOS


3. untar the installation file





4. Now we will start the  Puppet Enterprise Master installation.
 Go to the folder and run the installer file puppet-enterprise-installer

Note:  if you are not using a DNS server, add the entries for the IP address and hostname in the /etc/hosts files





5.  Press 'Y' to continue installation




6. As shown in the above pic, open a browser and go to the url mentioned.
     Here we are opening https://puppetmaster:3000
    Click "Let's get started!"  to continue the installation.

Note: If you are accessing GUI from a different desktop/server make sure that the port 3000 and 443 ( for later use ) is open between them






7. Choose your deployment mode.
   Since my environment is less than 7000 nodes,  I am using only 1 master server, I am going with Monolithic.




8. Enter the puppet master FQDN and Puppet master DNS alias.

Note: if you don't have a DNS server, make sure that these entries are added to /etc/hosts file




9.  Enable Application Orchestration




10
10.1  Select the database support needed.
        Here I am selecting the option to install the PostgresSQL and to create PuppetDB database on it      during the installation.
 10.2 Enter the admin password, this is need to login to the Enterprise GUI console after installation.




11. Confirm the plan and click "continue"






11.  If there are no messages in red color, click "Deploy now".




12. Now the Puppet entries is getting installed.




13. After installation you can login to the Puppet Enterprise GUI using https://puppetmaster url and user name as admin and password  given in step 10.2






Thursday, March 17, 2016

Vagrant - running a vagrant box in windows 7

Vagrant  - running a box in windows 7



1.  Download and install virtual box from https://www.virtualbox.org/wiki/Downloads
     and start up the virtual box.

2. Download and install vagrant from  http://downloads.vagrantup.com/

I had my vagrant installed in the location C:\HashiCorp\Vagrant.
And added C:\HashiCorp\Vagrant\;C:\HashiCorp\Vagrant\bin to windows environment path.




3.  Also install putty from http://www.putty.org/   for SSH access to the box






4.  I had issues installing the box image using vagrant command, through internet. So I downloaded them and copied them and initiated it locally.

For this I created a project location C:\HashiCorp\Vagrant\Projects\VM

And I downloaded the box file or copied the box file from the url http://files.vagrantup.com/lucid32.box to the default box file location %userprofile%\.vagrant.d\boxes


5.  Add the downloaded box.
For this open the windows command prompt as administrator and add the box to vagrant list using command,

> vagrant box add lucid32 %userprofile%\.vagrant.d\boxes\lucid32.box --provider virtualbox


  note : replace %userprofile% with the location to .vagrant.d folder





6.   Go to the project location C:\HashiCorp\Vagrant\Projects\VM and run the command

> vagrant init lucid32

it will create a vagrant configuration file in the current project location




7. Now start up the VM using the box image lucid32 by running the command

> vagrant up





 8.  To get the ssh details run the command,

> vagrant ssh-config



9. Use the details got from the step 8 to ssh login using putty.

 username : vagrant
 password: vagrant





Now you are in the vm.