This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@server:/opt# curl -v https://packages.cloud.google.com/apt/doc/apt-key.gpg | |
* Trying 172.217.28.142... | |
* TCP_NODELAY set | |
* Trying 2800:3f0:4001:815::200e... | |
* TCP_NODELAY set | |
* Immediate connect fail for 2800:3f0:4001:815::200e: Cannot assign requested address | |
* Trying 2800:3f0:4001:815::200e... | |
* TCP_NODELAY set | |
* Immediate connect fail for 2800:3f0:4001:815::200e: Cannot assign requested address | |
* Trying 2800:3f0:4001:815::200e... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#any interface with IP and port 8080 not resolv name | |
tcpdump -i any host {{ IP }} and port 8080 -nn | |
#How to capture VLAN tags that are used by tcpdump | |
tcpdump -i bond0 -nn -e vlan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#links from : | |
# https://kubernetes.io/docs/concepts/services-networking/service/ | |
# https://kubernetes.io/docs/concepts/services-networking/service/#service-tabs-2 (AWS LOADBALANCE) | |
Route: | |
expose a service, so that external clients can reach it by name. | |
Service: | |
A Kubernetes service serves as an internal load balancer. | |
It identifies a set of replicated pods in order to proxy the connections it receives to them. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Create a user (depends what autentication is config) | |
# htpasswd -c if is first time for create a file after that just remove -c | |
sudo htpasswd -c /etc/origin/master/htpasswd devuser | |
#Create a Group /Role | |
oc adm groups new groupname | |
#Get roles bound | |
#To view a list of all users that are bound to the project and their roles | |
oc get rolebindings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#get logs from a spefic pod and keep reading with -f flag | |
kubectl logs -f pod/ghost-1-wjf6m | |
#Connect to a pod | |
kubectl exec POD-NAME --stdin --tty /bin/sh | |
#execute a command in container, if have more than one inside pod first will be select. | |
kubectl exec 123456-7890 date | |
#Get output from running 'date' in ruby-container from pod 123456-7890 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#link | |
https://stefanprodan.com/2016/docker-private-registry-nexus-nginx/ | |
https://blog.sonatype.com/using-nexus-3-as-your-repository-part-3-docker-images | |
https://help.sonatype.com/pages/viewpage.action?pageId=5412197 | |
#Download nexus | |
#Run nexus | |
#Configure repo(hosted) for docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#EC2 | |
on RHEL7 need install docker for this enable extra rpm repos | |
Install guide to running in docker container | |
https://docs.openshift.org/latest/getting_started/administrators.html#running-in-a-docker-container | |
--boot-docker-image.sh | |
#!/bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Install Jenkins plugin | |
java -jar jenkins-cli.jar -s http://127.0.0.1:8080/ install-plugin slack --username NAME --password PASS | |
##URL TO DOWNLOAD JENKINS-CLI | |
localhost:8080/jnlpJars/jenkins-cli.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
resource "aws_subnet" "public-subnet" { | |
count = "${length(split(",", lookup(var.azs, var.region)))}" | |
vpc_id = "${aws_vpc.main.id}" | |
cidr_block = "${cidrsubnet(var.vpc_cidr, 3,count.index +3 )}" | |
availability_zone = "${element(split(",", lookup(var.azs, var.region)), count.index)}" | |
map_public_ip_on_launch = true | |
tags { | |
Name = "Public-Subnet" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#spefic interface and dont resolve name | |
tcpdump -n -i eth0 | |
#only tcp | |
tcpdump -i eth0 tcp | |
#specific port | |
tcpdump -i eth0 port 22 | |
#specific src |
NewerOlder