Setting Up GitHub Enterprise in GCP

Few required url to explore

https://github.com/enterprise

https://enterprise.github.com/trial

https://help.github.com/enterprise/2.16/

https://help.github.com/enterprise/2.16/admin/guides/installation/

https://help.github.com/enterprise/2.16/admin/guides/installation/installing-github-enterprise-server-on-google-cloud-platform/

 

If we are good at gcp cli utility , it make our work easier to browse things .

root@cloudshell:~$ gcloud compute images list –project github-enterprise-public –no-standard-images

NAME                       PROJECT                   FAMILY  DEPRECATED  STATUS

github-enterprise-2-14-4   github-enterprise-public                      READY

github-enterprise-2-14-5   github-enterprise-public                      READY

github-enterprise-2-14-6   github-enterprise-public                      READY

github-enterprise-2-14-7   github-enterprise-public                      READY

github-enterprise-2-14-8   github-enterprise-public                      READY

github-enterprise-2-14-9   github-enterprise-public                      READY

github-enterprise-2-15-0   github-enterprise-public                      READY

github-enterprise-2-15-1   github-enterprise-public                      READY

github-enterprise-2-15-2   github-enterprise-public                      READY

github-enterprise-2-15-3   github-enterprise-public                      READY

github-enterprise-2-15-4   github-enterprise-public                      READY

github-enterprise-2-15-5   github-enterprise-public                      READY

github-enterprise-2-15-6   github-enterprise-public                      READY

github-enterprise-2-15-7   github-enterprise-public                      READY

github-enterprise-2-16-0   github-enterprise-public                      READY

github-enterprise-2-16-1   github-enterprise-public                      READY

github-enterprise-2-16-2   github-enterprise-public                      READY

 

root@cloudshell:~$ gcloud compute networks create github-network –subnet-mode auto

Created [https://www.googleapis.com/compute/v1/projects/evident-axle-224004/global/networks/github-network].

NAME            SUBNET_MODE  BGP_ROUTING_MODE  IPV4_RANGE  GATEWAY_IPV4

github-network  AUTO         REGIONAL

Instances on this network will not be reachable until firewall rules

are created. As an example, you can allow all internal traffic between

instances as well as SSH, RDP, and ICMP by running:

$ gcloud compute firewall-rules create <FIREWALL_NAME> –network github-network –allow tcp,udp,icmp –source-ranges <IP_RANGE>

$ gcloud compute firewall-rules create <FIREWALL_NAME> –network github-network –allow tcp:22,tcp:3389,icmp

 

gcloud compute firewall-rules create github-rules  –network github-network –allow tcp:22,tcp:25,tcp:80,tcp:122,udp:161,tcp:443,udp:1194,tcp:8080,tcp:8443,tcp:9418,icmp

Creating firewall…Created [https://www.googleapis.com/compute/v1/projects/evident-axle-224004/global/firewalls/github-rules].

Creating firewall…done.

NAME          NETWORK         DIRECTION  PRIORITY  ALLOW                                                                                  DENY  DISABLED

github-rules  github-network  INGRESS    1000      tcp:22,tcp:25,tcp:80,tcp:122,udp:161,tcp:443,udp:1194,tcp:8080,tcp:8443,tcp:9418,icmp        False

 

ex: gcloud compute disks create DATA-DISK-NAME –size DATA-DISK-SIZE –type DATA-DISK-TYPE –zone ZONE

We are pretty sure what are different types of disks and zone we have to fulfil above command requirement

Will see what we in place , with the help of gcloud ,  believe me its awesome using glcoud cli .

gcloud compute zones list

NAME                       REGION                   STATUS  NEXT_MAINTENANCE  TURNDOWN_DATE

us-east1-b                 us-east1                 UP

us-east1-c                 us-east1                 UP

us-east1-d                 us-east1                 UP

us-east4-c                 us-east4                 UP

us-east4-b                 us-east4                 UP

us-east4-a                 us-east4                 UP

us-central1-c              us-central1              UP

us-central1-a              us-central1              UP

us-central1-f              us-central1              UP

 

gcloud compute disk-types list

NAME         ZONE                       VALID_DISK_SIZES

local-ssd    europe-west3-b             375GB-375GB

pd-ssd       europe-west3-b             10GB-65536GB

pd-standard  europe-west3-b             10GB-65536GB

local-ssd    europe-west3-c             375GB-375GB

pd-ssd       europe-west3-c             10GB-65536GB

 

gcloud compute disks create guthubdisk –size 50GB –type pd-standard –zone us-east1-b

WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see: https://developers.google.com/compute/docs/disks#performance.

Created [https://www.googleapis.com/compute/v1/projects/evident-axle-224004/zones/us-east1-b/disks/guthubdisk].

NAME        ZONE        SIZE_GB  TYPE         STATUS

guthubdisk  us-east1-b  50       pd-standard  READY

New disks are unformatted. You must format and mount a disk before it

can be used. You can find instructions on how to do this at:

https://cloud.google.com/compute/docs/disks/add-persistent-disk#formatting

 

gcloud compute instances create github-server –machine-type n1-standard-8 –image github-enterprise-2-16-0 –disk name=guthubdisk –metadata serial-port-enable=1 –zone us-east1-b –network github-network –image-project github-enterprise-public

Created [https://www.googleapis.com/compute/v1/projects/evident-axle-224004/zones/us-east1-b/instances/github-server].

NAME           ZONE        MACHINE_TYPE   PREEMPTIBLE  INTERNAL_IP  EXTERNAL_IP   ST

 

https://enterprise.github.com/download

As of now we will setting up 45 trail version .

 

Image 2019-02-17 at 9.01.27 AMImage 2019-02-17 at 9.02.07 AMImage 2019-02-17 at 9.03.50 AMImage 2019-02-17 at 9.08.22 AMImage 2019-02-17 at 9.09.00 AMImage 2019-02-17 at 9.32.37 AMImage 2019-02-17 at 9.34.17 AMImage 2019-02-17 at 9.34.46 AMImage 2019-02-17 at 9.35.14 AMImage 2019-02-17 at 9.35.52 AMImage 2019-02-17 at 9.40.39 AMImage 2019-02-17 at 9.42.28 AMImage 2019-02-17 at 9.42.51 AMImage 2019-02-17 at 9.44.24 AMImage 2019-02-17 at 9.50.19 AMImage 2019-02-17 at 9.52.32 AMImage 2019-02-17 at 9.53.56 AMImage 2019-02-17 at 9.54.38 AMImage 2019-02-17 at 9.54.54 AM

 

 

ssh

 

root@github-server:~# netstat -tulpn

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name

tcp        0      0 0.0.0.0:9203            0.0.0.0:*               LISTEN      18958/nginx     

tcp        0      0 127.0.0.1:8500          0.0.0.0:*               LISTEN      21895/consul    

tcp        0      0 127.0.0.1:9204          0.0.0.0:*               LISTEN      18730/haproxy   

tcp        0      0 0.0.0.0:8149            0.0.0.0:*               LISTEN      18730/haproxy   

tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      18719/dnsmasq   

tcp        0      0 127.0.0.1:8086          0.0.0.0:*               LISTEN      18818/haproxy   

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      18818/haproxy   

tcp        0      0 127.0.0.1:8087          0.0.0.0:*               LISTEN      18730/haproxy   

tcp        0      0 0.0.0.0:3032            0.0.0.0:*               LISTEN      29627/1)        

tcp        0      0 127.0.0.1:8600          0.0.0.0:*               LISTEN      21895/consul    

tcp        0      0 0.0.0.0:1336            0.0.0.0:*               LISTEN      18958/nginx     

tcp        0      0 0.0.0.0:3033            0.0.0.0:*               LISTEN      29627/1)        

tcp        0      0 127.0.0.1:1337          0.0.0.0:*               LISTEN      18730/haproxy   

tcp        0      0 0.0.0.0:3034            0.0.0.0:*               LISTEN      29627/1)        

tcp        0      0 0.0.0.0:3002            0.0.0.0:*               LISTEN      28599/longpolld

tcp        0      0 0.0.0.0:8090            0.0.0.0:*               LISTEN      18958/nginx     

tcp        0      0 0.0.0.0:122             0.0.0.0:*               LISTEN      3176/sshd       

tcp        0      0 0.0.0.0:3035            0.0.0.0:*               LISTEN      29627/1)        

tcp        0      0 0.0.0.0:5115            0.0.0.0:*               LISTEN      18958/nginx     

tcp        0      0 0.0.0.0:8443            0.0.0.0:*               LISTEN      18818/haproxy   

tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      18818/haproxy   

tcp        0      0 127.0.0.1:8091          0.0.0.0:*               LISTEN      18730/haproxy   

tcp        0      0 0.0.0.0:3036            0.0.0.0:*               LISTEN      29627/1)        

tcp        0      0 0.0.0.0:3037            0.0.0.0:*               LISTEN      29627/1)        

tcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN      22952/python    

tcp        0      0 127.0.0.1:8002          0.0.0.0:*               LISTEN      18730/haproxy   

tcp        0      0 127.0.0.1:4004          0.0.0.0:*               LISTEN      18730/haproxy   

tcp        0      0 127.0.0.1:4005          0.0.0.0:*               LISTEN      18730/haproxy   

tcp        0      0 127.0.0.1:4327          0.0.0.0:*               LISTEN      18958/nginx     

tcp        0      0 0.0.0.0:9000            0.0.0.0:*               LISTEN      19953/git-daemon

tcp        0      0 127.0.0.1:4328          0.0.0.0:*               LISTEN      18958/nginx     

tcp        0      0 0.0.0.0:3050            0.0.0.0:*               LISTEN      29188/codeload 

tcp        0      0 0.0.0.0:9418            0.0.0.0:*               LISTEN      18818/haproxy   

tcp        0      0 0.0.0.0:6379            0.0.0.0:*               LISTEN      20415/redis-server

tcp        0      0 0.0.0.0:11211           0.0.0.0:*               LISTEN      19555/memcached

tcp        0      0 127.0.0.1:3307          0.0.0.0:*               LISTEN      18730/haproxy   

tcp        0      0 127.0.0.1:9100          0.0.0.0:*               LISTEN      18958/nginx     

tcp        0      0 127.0.0.1:6380          0.0.0.0:*               LISTEN      18730/haproxy   

tcp        0      0 127.0.0.1:3308          0.0.0.0:*               LISTEN      18730/haproxy   

tcp        0      0 0.0.0.0:9101            0.0.0.0:*               LISTEN      18958/nginx     

tcp        0      0 0.0.0.0:9102            0.0.0.0:*               LISTEN      18958/nginx     

tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      18818/haproxy   

tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      18818/haproxy   

tcp        0      0 0.0.0.0:9105            0.0.0.0:*               LISTEN      18958/nginx     

tcp        0      0 127.0.0.1:9201          0.0.0.0:*               LISTEN      18730/haproxy   

tcp        0      0 127.0.0.1:8082          0.0.0.0:*               LISTEN      18958/nginx     

tcp6       0      0 :::18259                :::*                    LISTEN      29508/semiotic.bin

tcp6       0      0 :::9203                 :::*                    LISTEN      18958/nginx     

tcp6       0      0 :::9300                 :::*                    LISTEN      19612/java      

tcp6       0      0 ::1:9204                :::*                    LISTEN      18730/haproxy   

tcp6       0      0 :::53                   :::*                    LISTEN      18719/dnsmasq   

tcp6       0      0 :::8149                 :::*                    LISTEN      18730/haproxy   

tcp6       0      0 :::22                   :::*                    LISTEN      18818/haproxy   

tcp6       0      0 ::1:8086                :::*                    LISTEN      18818/haproxy   

tcp6       0      0 ::1:8087                :::*                    LISTEN      18730/haproxy   

tcp6       0      0 :::1336                 :::*                    LISTEN      18958/nginx     

tcp6       0      0 :::5208                 :::*                    LISTEN      18730/haproxy   

tcp6       0      0 ::1:1337                :::*                    LISTEN      18730/haproxy   

tcp6       0      0 :::8090                 :::*                    LISTEN      18958/nginx     

tcp6       0      0 :::122                  :::*                    LISTEN      3176/sshd       

tcp6       0      0 :::3002                 :::*                    LISTEN      28599/longpolld

tcp6       0      0 :::5115                 :::*                    LISTEN      18958/nginx     

tcp6       0      0 ::1:8091                :::*                    LISTEN      18730/haproxy   

tcp6       0      0 :::443                  :::*                    LISTEN      18818/haproxy   

tcp6       0      0 :::8443                 :::*                    LISTEN      18818/haproxy   

tcp6       0      0 ::1:8000                :::*                    LISTEN      22952/python    

tcp6       0      0 :::8001                 :::*                    LISTEN      21637/grafana-serve

tcp6       0      0 ::1:8002                :::*                    LISTEN      18730/haproxy   

tcp6       0      0 ::1:4004                :::*                    LISTEN      18730/haproxy   

tcp6       0      0 ::1:4005                :::*                    LISTEN      18730/haproxy   

tcp6       0      0 :::4486                 :::*                    LISTEN      20768/ruby      

tcp6       0      0 ::1:4327                :::*                    LISTEN      18958/nginx     

tcp6       0      0 :::9000                 :::*                    LISTEN      19953/git-daemon

tcp6       0      0 ::1:4328                :::*                    LISTEN      18958/nginx     

tcp6       0      0 :::3306                 :::*                    LISTEN      21489/mysqld    

tcp6       0      0 :::9418                 :::*                    LISTEN      18818/haproxy   

tcp6       0      0 :::6379                 :::*                    LISTEN      20415/redis-server

tcp6       0      0 :::11211                :::*                    LISTEN      19555/memcached

tcp6       0      0 ::1:3307                :::*                    LISTEN      18730/haproxy   

tcp6       0      0 :::8300                 :::*                    LISTEN      21895/consul    

tcp6       0      0 ::1:9100                :::*                    LISTEN      18958/nginx     

tcp6       0      0 ::1:3308                :::*                    LISTEN      18730/haproxy   

tcp6       0      0 ::1:6380                :::*                    LISTEN      18730/haproxy   

tcp6       0      0 :::8301                 :::*                    LISTEN      21895/consul    

tcp6       0      0 :::9101                 :::*                    LISTEN      18958/nginx     

tcp6       0      0 :::8686                 :::*                    LISTEN      29825/gpgverify

tcp6       0      0 :::8302                 :::*                    LISTEN      21895/consul    

tcp6       0      0 :::9102                 :::*                    LISTEN      18958/nginx     

tcp6       0      0 :::9200                 :::*                    LISTEN      19612/java      

tcp6       0      0 :::80                   :::*                    LISTEN      18818/haproxy   

tcp6       0      0 :::8080                 :::*                    LISTEN      18818/haproxy   

tcp6       0      0 :::9105                 :::*                    LISTEN      18958/nginx     

tcp6       0      0 ::1:9201                :::*                    LISTEN      18730/haproxy   

tcp6       0      0 ::1:8082                :::*                    LISTEN      18958/nginx     

udp        0      0 0.0.0.0:8125            0.0.0.0:*                           19698/collectd 

udp        0      0 0.0.0.0:24680           0.0.0.0:*                           30340/s,    0ms avg

udp        0      0 127.0.0.1:8600          0.0.0.0:*                           21895/consul    

udp        0      0 0.0.0.0:44243           0.0.0.0:*                           30336/s,   29ms avg

udp        0      0 0.0.0.0:53              0.0.0.0:*                           18719/dnsmasq   

udp        0      0 0.0.0.0:68              0.0.0.0:*                           961/dhclient    

udp        0      0 0.0.0.0:123             0.0.0.0:*                           19001/chronyd   

udp        0      0 0.0.0.0:323             0.0.0.0:*                           19001/chronyd   

udp6       0      0 :::8301                 :::*                                21895/consul    

udp6       0      0 :::8302                 :::*                                21895/consul    

udp6       0      0 :::53                   :::*                                18719/dnsmasq   

udp6       0      0 :::123                  :::*                                19001/chronyd   

udp6       0      0 :::323                  :::*                                19001/chronyd   

root@github-server:~#

 

 

 

 

 

 

 

 

Leave a comment