#general (2020-08)
General conversations related to DevOps/Automation
General Discussions
2020-08-01
Hey everyone, give a warm welcome to our newest members!
- @Phillip Robeson
Good to have you here =)
Thank you, good to be here!
2020-08-02
Hey everyone, give a warm welcome to our newest members!
- @vibian
Good to have you here =)
2020-08-03
Hey everyone, give a warm welcome to our newest members!
- @Nicolás de la Torre
- @Alan Lima
Good to have you here =)
2020-08-04
Hey everyone, give a warm welcome to our newest members!
- @Florent Valdelievre
- @Alex D
- @alex
- @Ryan Hoffman
- @ashwin
Good to have you here =)
2020-08-05
Hey everyone, give a warm welcome to our newest members!
- @Nigel Kirby
Good to have you here =)
Thanks!
2020-08-06
npm is broken atm - https://status.npmjs.org/incidents/cksjqc1w11v5
npm, Inc.’s Status Page - Issues accessing the npmjs.com website.
Hey everyone, give a warm welcome to our newest members!
- @Piotr Kassin
Good to have you here =)
2020-08-07
Hey everyone, give a warm welcome to our newest members!
- @JB
- @Jaeson
- @Rogeria Portilho
- @Valentyn
- @Mike Dillion
- @Alex
- @Chris Picht
Good to have you here =)
2020-08-08
Hey everyone, give a warm welcome to our newest members!
- @jj
- @TJMiller
Good to have you here =)
2020-08-10
Hey everyone, give a warm welcome to our newest members!
- @VJ
- @Almog Cohen
- @shawn
Good to have you here =)
2020-08-11
Hey everyone, give a warm welcome to our newest members!
- @Soumya
Good to have you here =)
2020-08-12
Hey everyone, give a warm welcome to our newest members!
- @Shaun
- @James Conolly
- @DoNRW
Good to have you here =)
2020-08-13
Hey everyone, give a warm welcome to our newest members!
- @Cassandra Gregg
- @Roach
- @nux
- @Makeshift (Connor Bell)
- @Mario Méndez
Good to have you here =)
2020-08-14
Hey everyone, give a warm welcome to our newest members!
- @dan
- @Lukasz
- @Phil Boyd
- @mm
- @Terence Hegarty
- @Milecia McGregor
Good to have you here =)
Hi
hello
2020-08-15
Hey everyone, give a warm welcome to our newest members!
- @Oleg Gorodnitchi
- @bbhupati
Good to have you here =)
2020-08-16
Hey everyone, give a warm welcome to our newest members!
- @AJ Steers
- @charlespogi
Good to have you here =)
Thanks
2020-08-17
Hey everyone, give a warm welcome to our newest members!
- @code1
- @Andrey
Good to have you here =)
Hi All. Anyone know of any tool that accepts multiple IP/CIDRs and creates a map of used and unused IP ranges ?
This would come in handy since we have an old VPC that I’m subnetting. It has old subnets that can’t be removed so I’m trying my best to work around it to find out the gaps where I can add more IPs.
At the moment, there are over 20 subnets and it would be nice to be able to visualize the available and the unavailable.
you’ve checked out nmap
?
Be sure to check out https://aws.amazon.com/security/penetration-testing/ before using nmap within a VPC, as port/protocol scanning is prohibited by Amazon without consent.
Request a penetration test for your AWS cloud infrastructure here.
i’ve used these google sheet functions before… https://blog.jwr.io/subnetting/vpc/automation/2017/09/29/subnetting-in-google-sheets.html
Automating subnet layout with Google Sheets IP Functions
/**
* IP Functions Google Apps Script
*
* Written by Jason Emery
* August 2013
*
* For information and help:
* <https://docs.google.com/a/costco.com/document/d/1x3UD12_MOpPIK2iuqRDv9Leku-sJmdtnVmrJmtkLfL8/edit?usp=sharing>
*
* Sample Spreadsheet:
* <https://docs.google.com/spreadsheet/ccc?key=0AtvdVN89Xo5KdEhSaWctWTV1d1RpQUt1TTF1blFtVnc&usp=sharing>
*
* Last update 8/18/2016 with new onOpen function
*/
function onOpen() {
SpreadsheetApp.getUi()
.createMenu('IPFunctions')
.addItem('Subnet Fill', "SUBNETFILL")
.addItem("IP Sort", "IPSORT")
.addSeparator()
.addItem("To Lower", "TOLOWER")
.addItem("Remove Formulas", "REMOVE_FORMULAS")
.addSeparator()
.addItem("IPFunctions Help", "OPEN_HELP")
.addToUi();
}
function OPEN_HELP(){
var href = "<https://docs.google.com/document/d/18uB0Cbs37WOe1C-em5Rae6Hu8y5rUOvrMo2MoOyVlG4/edit?usp=sharing>"
var title = "IP Functions Help"
var app = UiApp.createApplication().setHeight(50).setWidth(200);
app.setTitle(title);
var link = app.createAnchor("OPEN HELP FILE", href).setId("link");
app.add(link);
var doc = SpreadsheetApp.getActive();
doc.show(app);
}
function IPFILL (ip) {
var ipaddresses = [];
var ipnum = (IPDD2DEC(IPBROADCAST(ip))-IPDD2DEC(ip)+1);
ipaddresses.push([ip]);
for (var i=1; i<ipnum;i+=1) {
ipaddresses.push([IPADD(ip,i)]);
}
return ipaddresses;
}
function IPNETWORK(ip) {
var mask = IPMASK(ip);
var ipnet=""
if (ip.indexOf("/") <= 0){return "no mask"}
for (var i=1;i<5;i+=1) {
ipnet = ipnet + (IPOCTET(ip,i) & IPOCTET(mask,i)) + ".";
}
return ipnet.substr(0,ipnet.length-1);
}
function IPNEXTNET (ip) {
var masklen;
if (ip.indexOf("/") <= 0){return "no mask"}
masklen = ip.substr(ip.indexOf("/")+1);
return IPADD(IPBROADCAST(ip),1) + "/" + masklen;
}
function IPISIN (ip1, ip2) {
var ipnet;
if (IPMASKLEN(ip1)<IPMASKLEN(ip2)) {
return false;
}
if (IPNETWORK(ip2)==IPNETWORK(IPADDR(ip1)+"/"+IPMASKLEN(ip2))) {
return true;
}
return "unkown";
}
function IPBROADCAST (ip) {
var masklen;
masklen = ip.substr(ip.indexOf("/")+1);
ip = IPDD2BIN(ip)
return IPBIN2DD(ip.substr(0,masklen) + "1".repeat(32-masklen))
}
function IPMASKLEN (ip) {
if (ip.indexOf("/")!=-1) {
return parseInt(ip.substr(ip.indexOf("/")+1));
}
else {return 32}
}
function IPMASK (ip) {
var masklen;
masklen = ip.substr(ip.indexOf("/")+1);
return IPDEC2DD(parseInt(("1".repeat(masklen) + "0".repeat(32-masklen)),2));
}
function IPMASKWILD (ip) {
var masklen;
masklen = ip.substr(ip.indexOf("/")+1);
return IPDEC2DD(parseInt(("0".repeat(masklen) + "1".repeat(32-masklen)),2));
}
function IPHOSTS (ip) {
var masklen;
masklen = ip.substr(ip.indexOf("/")+1);
return (Math.pow(2, (32-masklen))-2);
}
/**
Takes and IP address and adds an integer.
*/
function IPADD(ip, x) {
x = x || 1;
ip = IPDD2DEC(IPADDR(ip));
return IPDEC2DD(ip + x);
}
/**
Takes an IP and returns an array of the octets, if octet is specified,
then only returns that specific octet, 1 through 4.
*/
function IPOCTET (ip,octet) {
if (typeof octet === "undefined" || octet===null) octet = 0;
ip = IPADDR(ip);
if (octet<0 || octet>4 || !IPVALID(ip))
{
return "invalid octet";
}
var regexp = /\./g;
var match = 1;
var matches = [-1];
var i;
var octets = [];
while ((match = regexp.exec(ip)) != null) {
matches.push(match.index);
}
matches.push(ip.length);
for (i=1;i<5;i++) {
octets[i] = parseInt(ip.substring(matches[i-1]+1,matches[i]));
}
if (octet === 0) {
matches.shift();
return octets;
}
return octets[octet];
};
/**
Strips the subnet from the end of an ip/mask
*/
function IPADDR (ip) {
var IPADDR;
if (IPVALID(ip) && ip.indexOf("/")!=-1)
{
IPADDR=ip.substring(0,ip.indexOf("/"))
}
else
{
IPADDR = ip
}
return IPADDR;
};
/**
Checks to see if the IP address is valid
*/
function IPVALID (ip) {
return true;
};
/**
Converts decimal IP to Dotted Decimal
*/
function IPDEC2DD (ip) {
var IPHEX, IPDD="";
var octets=[];
IPHEX = ("00000000" + ip.toString(16)).substr(-8);
for (var i=1;i<5;i+=1) {
IPDD = IPDD + parseInt(IPHEX.substr(0,2),16).toString() + ".";
IPHEX = IPHEX.substr(-IPHEX.length+2);
}
return IPDD.substr(0,IPDD.length-1);
}
/**
Converts dotted decimal IP to Hexadecimal
*/
function IPDD2HEX(ip) {
var octet;
var IPHEX="";
var octets=[];
var i;
octets = IPOCTET(ip);
for (i=1;i<5;i++) {
IPHEX = IPHEX + ("00" + octets[i].toString(16)).substr(-2);
}
return IPHEX;
};
/**
Converts dotted decimal IP to Binary
*/
function IPDD2BIN (ip) {
var IPBIN="";
var octets=[];
octets = IPOCTET(ip);
for (i=1;i<5;i++) {
IPBIN = IPBIN + ("00000000" + octets[i].toString(2)).substr(-8);
}
return IPBIN;
}
/**
Converts dotted decimal IP to Decimal
*/
function IPDD2DEC (ip) {
var octet;
var IPHEX="";
var octets=[];
var i;
return parseInt(IPDD2HEX(ip),16);
}
function IPBIN2DD (ip) {
if (ip.len<32) {ip = ("0".repeat(ip.len-32) + ip) }
else if (ip.length>32) { ip = ip.substr(-32) }
return parseInt(ip.substr(0,8),2) + "." + parseInt(ip.substr(8,8),2) + "."
+ parseInt(ip.substr(16,8),2) + "." + parseInt(ip.substr(24,8),2)
}
String.prototype.repeat = function(count) {
if (count < 1) return '';
var result = '', pattern = this.valueOf();
while (count > 0) {
if (count & 1) result += pattern;
count >>= 1, pattern += pattern;
}
return result;
};
Array.prototype.toLowerCase= function(){
var L= this.length, tem;
while(L){
tem= this[--L] || '';
if(tem.toLowerCase) this[L]= tem.toLowerCase();
}
return this;
}
/**
Sorts a column of IP addresses or subnets by IP order
*/
function IPSORT () {
var sub1, sub2;
ssActive = SpreadsheetApp.getActiveSheet();
rgMyRange = ssActive.getActiveRange();
var numRows = rgMyRange.getNumRows();
var numCols = rgMyRange.getNumColumns();
ip = (rgMyRange.getCell(1,1).getValue());
sub1 = ip;
var selection = rgMyRange.getValues();
for (var i=0;i<selection.length;i+=1) {
selection[i] = ([parseInt(IPDD2DEC(selection[i].toString()))]);
}
selection.sort(function(a,b){return a-b});
for (var i=0;i<selection.length;i+=1) {
selection[i] = ([IPDEC2DD(parseInt(selection[i]))]);
}
rgMyRange.setValues(selection);
}
/**
Fills a column with subnets incrementally. If the range is a single row, then will fill horizontally.
*/
function SUBNETFILL () {
var sub1, sub2;
ssActive = SpreadsheetApp.getActiveSheet();
rgMyRange = ssActive.getActiveRange();
var numRows = rgMyRange.getNumRows();
var numCols = rgMyRange.getNumColumns();
ip = (rgMyRange.getCell(1,1).getValue());
sub1 = ip;
if (numRows>1) {
var subnets = new Array([ip]);
for (var i=1; i<numRows;i+=1) {
sub2 = IPNEXTNET(sub1,1);
subnets.push([sub2]);
sub1 = sub2;
};
rgMyRange.setValues(subnets);
}
else if (numCols>1) {
var subnets = new Array([[ip]]);
for (var i=1; i<numCols;i+=1) {
sub2 = IPNEXTNET(sub1,1);
subnets[0][i] = sub2;
sub1 = sub2;
}
rgMyRange.setValues(subnets);
}
else {
Browser.msgBox("Please select a range")
}
}
/**
Fills a column with IP addresses. If only one cell is selected it will fill
in the subnet as specified by the mask. If a range is selected it will fill in the
selected range incrementally.
*/
function IPFILL_UTIL () {
var ipaddresses = [];
ssActive = SpreadsheetApp.getActiveSheet();
rgMyRange = ssActive.getActiveRange();
var numRows = rgMyRange.getNumRows();
var numCols = rgMyRange.getNumColumns();
ip = (rgMyRange.getCell(1,1).getValue());
//Browser.msgBox(ip + "," + IPADD(ip,1))
var ipnum = (IPDD2DEC(IPBROADCAST(ip))-IPDD2DEC(ip)+1);
if (numRows==1 && numCols==1) {
for (var i=1; i<ipnum;i+=1) {
ipaddresses.push([IPADD(ip,i)]);
}
rgMyRange.offset(1, 0, ipaddresses.length, 1).setValues(ipaddresses);
}
}
function TOLOWER () {
var sheet = SpreadsheetApp.getActiveSheet();
var selection = sheet.getActiveRange();
var array = selection.getValues();
array = array.toLowerCase();
selection.setValues(array);
}
function REMOVE_FORMULAS () {
var sheet = SpreadsheetApp.getActiveSheet();
var selection = sheet.getActiveRange();
//var array = selection.getValues();
selection.copyTo(selection, {contentsOnly: true});
}
dang, where did the snippet link go in slack?
@Erik Osterman (Cloud Posse) does nmap actually visualize the mapping ? i have access to the account so i’m aware of all the ip ranges that are used already. im looking for the unused area easily.
@loren thanks! I’ll check out the google sheets function. I’m really surprised there isn’t a tool like this available already
2020-08-18
Can someone recommend resources I can use to teach Python, that focus of getting things correct and simple rather than making things complicated?
(I don’t want to spend 10% of the course unconvincingly explaining why they should ignore classes unless they need to manage some real state or have at least 5+ years of experience of programming in highly advanced environments, separated from Robert Martin by a 10 metre wall of lead and concrete :D)
This is by far one of the best resources imho https://automatetheboringstuff.com/
thanks
np!
@Karoline Pauls Friend of mine trains everyone in Python, check out https://skill-sprint.com/for-python/
Python Skill Sprints
Hey everyone, give a warm welcome to our newest members!
- @Sheece
- @ira bhardwaj
- @learning_djy
- @Andy Hibbert
Good to have you here =)
2020-08-19
Hey everyone, give a warm welcome to our newest members!
- @Alla Aleksandrovska
- @Ajay Kumar
- @Pedro Torres
- @Shankar Kumar Chaudhary
- @jdtobe
Good to have you here =)
Anyone have any insight on this question: https://sweetops.slack.com/archives/CHDR1EWNA/p1597861856121700
Question for today although I’m not sure I can attend live (are these recorded?): is there a way of allowing an AWS lambda to http a service running in same VPC behind an AWS classic LB that filters on IP addresses? In other words I have a classic LB that I want to configure to allow incoming traffic only from corp network (I have done that part), or from the Lambdas. I’m thinking that it cannot be done robustly (I would have to find WAN IP of the lambdas), instead I need to create internal LB that the Lambda will target. Any insight would be much appreciated!
@Erik Osterman (Cloud Posse) is there a good channel to ask about: “Does anyone have experience migrating from RDS (postgres) to Aurora (postgres) live, without downtime. And/or their thoughts on using Aurora?”
I have thoughts around it all, but just want to ask around to see what i’m missing
maybe #aws ? lol
Haha, ya, maybe #aws or next week’s #office-hours ! We were 34 people on the call today
2020-08-20
Hey everyone, give a warm welcome to our newest members!
- @Taras
- @Vikram Yerneni
- @Theo Gravity
- @Chad
- @manvinderajput
Good to have you here =)
2020-08-21
Hey everyone, give a warm welcome to our newest members!
- @Vitor Ribeiro
- @Tuan Le
- @Andreas Hage Storlien
- @Grid Cell
- @Lukasz Raczylo
Good to have you here =)
i don’t think there is a networking or zero-trust channel, so just dropping this here. really fantastic explainer on nat traversal, simultaneously technical, understandable, and hilarious… https://tailscale.com/blog/how-nat-traversal-works/
In this post, we’ll talk about how to establish a peer-to-peer connection between two machines, in spite of all the obstacles in the way.
tailscale is fairly new, operating in the zero-trust space, basically using wireguard to create a software-defined network of authorized connections between a client and private services
In this post, we’ll talk about how to establish a peer-to-peer connection between two machines, in spite of all the obstacles in the way.
2020-08-22
Hey everyone, give a warm welcome to our newest members!
- @Roger Krolow
- @roeland.andelhofs
- @Combrink van der Vyver
- @Asim
Good to have you here =)
o/
hello im new here. just want to ask, is there a chat for sweetops that is not on slack? i dont use slack and not really paying for them as well
Slack is free for members, you shouldn’t have to pay for anything.
oh cool, i just saw some standard trial message that is ending and is asking for payment details
Oh, our team was temporarily upgraded for free, but will go back to free tier next week. Anyways, members pay nothing.
2020-08-23
Hey everyone, give a warm welcome to our newest members!
- @Psy Shaitanya
Good to have you here =)
2020-08-24
Hey everyone, give a warm welcome to our newest members!
- @Kai XUE
- @4c74356b41
- @yogendra singh
- @Frank
- @Thomas Mundt
- @Dzmitry Khutaransky
Good to have you here =)
when running terragrunt apply in tfstate-backened its creating s3 and excpetion is coming whatr can i do to resolve it?
Try #terragrunt
2020-08-25
Hey everyone, give a warm welcome to our newest members!
- @Diego Saavedra-Kloss
- @Jakub
- @Hari raghav
- @traci curran
Good to have you here =)
2020-08-26
Hey everyone, give a warm welcome to our newest members!
- @natalie
- @J Alkjær
- @Justin Lai
- @Dario Erregue
- @Luke Maslany
- @Andrew Houston-Floyd
- @Victor Avila
Good to have you here =)
welcome all!
curious about something… is any member here permitted to invite others?
Sure thing @sean.conley! You can invite them or share the link: slack.sweetops.com
ah, even better. thanks!
as a side question… can you tell me how sweetops and hangops are related? I am in both and have been wondering if there are any differences.
Both communities cater to DevOps professionals. HangOps is one of the earlier communities. There’s no affiliation between HangOps and SweetOps. SweetOps is associated with Cloud Posse and our ecosystem of terraform modules and tools.
ok, cool. thanks.
have you joined us for #office-hours ?
2020-08-27
Hey everyone, give a warm welcome to our newest members!
- @pib
- @Anton Sh.
- @Tony Borowski
- @Aditya
- @Richard Saccoccia
- @Alex
- @Yoni Leitersdorf (Indeni Cloudrail)
- @Betsy
- @eblack
- @jmcglash
- @zidan
- @Rishabh Gupta
- @Matt Johnson
- @Jon Burman
Good to have you here =)
Thank u
2020-08-28
Any OSS/licensing/legal experts here?
If I have a product that I want to sell commercially, and it requires use of a GPL-licensed database (like MySQL or Neo4J), I can distribute my application without releasing the source code if my app only connects to the database, but doesn’t bundle/OEM it.
Would I still be safe if I made deploying the database part of my helm chart, so that my application and the database get deployed to kubernetes through one helm deployment?
As an example, the GitLab helm chart deploys a PostgreSQL database - no issue there since PostgreSQL uses a license that closely resembles MIT rather than GPL. If GitLab were to swap PostgreSQL with MySQL would they be in violation of MySQL’s license?
not sure of the answer - but curious to hear (slack needs a way to watch threads)
@Chris Fowles
Diving deeper down the rabbit hole - It sounds like the JDBC libraries are GPL too, so that would throw a huge wrench in the works
You might be able to get away with deploying the DB, but if your IP uses GPL libraries you are not in a good place
Andrew we had to deal with this too. For example, our software was shipped with GPL-licensed OS. You’re ok including GPL software in what you ship, as long as you don’t statically or dynamically link with it.
JDBC libraries are ones you link with, so that’s a problem. MySQL is not something you link with, so you’re OK.
(I’m not a lawyer so take my advice for what it cost you )
Our lawyer has said that if you deploy a Python package that requires a GPL one such that a pip install
causes the GPL one to be downloaded then you’re okay, because you’re not the one distributing the GPL. Causing it to be downloaded != shipping it yourself
That doesn’t directly answer your question, but it’s a relevant data point. (not legal advice. if you’re using this for actual commercial purposes, ask an IP lawyer.)
Hey everyone, give a warm welcome to our newest members!
- @alex
- @owlz
- @Peter Huynh
- @ag dsouza
Good to have you here =)
2020-08-29
Hey everyone, give a warm welcome to our newest members!
- @Jangshen Chen
- @joshb (hashicorp)
Good to have you here =)
2020-08-30
Hey everyone, give a warm welcome to our newest members!
- @Alejandro
Good to have you here =)
2020-08-31
Hey everyone, give a warm welcome to our newest members!
- @Kristinn Björgvin Árdal
- @Guruprakash S
Good to have you here =)