From owner-freebsd-cloud@freebsd.org Mon Mar 11 18:00:45 2019 Return-Path: Delivered-To: freebsd-cloud@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE4261528299 for ; Mon, 11 Mar 2019 18:00:45 +0000 (UTC) (envelope-from pgollucci@p6m7g8.com) Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 15B6E729E3 for ; Mon, 11 Mar 2019 18:00:44 +0000 (UTC) (envelope-from pgollucci@p6m7g8.com) Received: by mail-vs1-xe34.google.com with SMTP id t5so595456vsp.0 for ; Mon, 11 Mar 2019 11:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=p6m7g8-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=V28I64d0Y1VW8wezLa0bCc0Ie2uGl/2tA4Oixx1s0Hc=; b=gynP+5oIMlD5+3kJWANEeLubls6Hs73UyNtI1vs/W6ztW+6aRJyaZ1j5GKNrW7wt+v EjUg/gv8521879JKxZZbgCRJSWBd36dRjQPU7q8rxxpBKawEnotIilBB1cGEtK1P1wTd aXxXqd+r8+G0McdMXPPoYtTrdimo834lljtQXyqhO5N4o+75N5iUUTBaAhi0apBs/Xl/ PQWKy4U2YKGocq/2sQTgcYonliHujaKtHtiQm2+V4AgxcbFj22q0MnWZePCC1upSL+PN M3JpnGnade6ObiPN9tcITbD80YIVn5bCJ5DYLtL2vZS6khJ09uOHY2z/x7xGJ9mSNIVL Zvbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=V28I64d0Y1VW8wezLa0bCc0Ie2uGl/2tA4Oixx1s0Hc=; b=nF1gcC2clCgYI/pMRab9byKVgb8KOHC7USa1Aifp/ZDTgD+fXrDUShPRyX8mCg/ffM cmZ/fPmLv9CHECS3xcTBPClhzX1B6yBJjzzUaILDynHgOjERPshDKzj+hFbIOcwHS4et NjxU8boFVnJpB/RqDgEHp/rPVuXb7VpZ7lsqiwrHF3dFTmXbVDdibiyW6pxAizk0aSmC GIfhHvffBhqqrAVGpx87+x+oTk2PZ5DRw/Jltd1ZXxXIIOfIq5axZiw/r5j7BVs9Mfe6 h+WZV0mMRh0LkJT8wydcAJqLbwE2C6ozf3qWMUl3Vm/muI/9r5hFCflPlRTNeXU2Mg1w lV2g== X-Gm-Message-State: APjAAAVNx1+9ds/T2hoEjQEfxqK82m9XG95iphg/f56Uixhj+E9FQH7x Hpw8g3OUcK0mtPvllW5GHy1R/XJXYqsGm9/2i/ieedN++jI= X-Google-Smtp-Source: APXvYqwYiyN4c2Imwcc+cJitNNc5T+z0IxAEHDasNsXDxjoImRjEwD5SnRP1IktecsbYOHVx9+EMGjHU+fCgbxSzwLE= X-Received: by 2002:a67:e8c1:: with SMTP id y1mr16822481vsn.93.1552327243241; Mon, 11 Mar 2019 11:00:43 -0700 (PDT) MIME-Version: 1.0 References: <16C73F7C-3673-44CC-B59E-DA247A0C2DF7@rafal.net> In-Reply-To: <16C73F7C-3673-44CC-B59E-DA247A0C2DF7@rafal.net> From: "Philip M. Gollucci" Date: Mon, 11 Mar 2019 14:00:07 -0400 Message-ID: Subject: Re: How to base64 encode and upload userdata for EC2 Launch Template To: Rafal Lukawiecki Cc: freebsd-cloud@freebsd.org X-Rspamd-Queue-Id: 15B6E729E3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=p6m7g8-com.20150623.gappssmtp.com header.s=20150623 header.b=gynP+5oI X-Spamd-Result: default: False [-6.18 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; R_DKIM_ALLOW(-0.20)[p6m7g8-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-cloud@freebsd.org]; DMARC_NA(0.00)[p6m7g8.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[p6m7g8-com.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[4.3.e.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; MX_GOOD(-0.01)[alt1.aspmx.l.google.com,aspmx.l.google.com,aspmx2.googlemail.com,alt2.aspmx.l.google.com,aspmx3.googlemail.com]; R_SPF_NA(0.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-2.93)[ip: (-9.75), ipnet: 2607:f8b0::/32(-2.74), asn: 15169(-2.07), country: US(-0.07)] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-cloud@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "FreeBSD on cloud platforms \(EC2, GCE, Azure, etc.\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 18:00:45 -0000 You could pull it down from an S3 bucket that only the deployer and the ASG w/ IAM role have access to. I highly recommend versioning the bucket and make 2 for blue/green or red/black. On Mon, Mar 11, 2019 at 5:46 AM Rafal Lukawiecki wrote: > Hello Everyone, Hello Colin, > > I hope someone can explain, as I have been lost in this for over a week. I > would like to pass a small (4-5kB) tarball of files for the built-in cloud > init script of the official FreeBSD 12.0 EC2 AMI to get untarred and > processed (>, >>, or #!) upon instance launch. I have successfully done it > for over 2 years using Launch Configurations but I cannot make it work > using the new Launch Templates. > > No matter if base64 and upload via the console, or base64 and use aws cli, > or create an LC and convert to an LT, it only works with LC. > > So far, I can see that depending which route I use to upload the file, > when I download it back from the finished template/configuration there seem > to be 3 different userdata lengths, even though I always pass the same > input. It suggests to me that some other processing of that input happens, > and I am lost where to hunt for it. > > Have any of you nailed it down? What steps do you take to prepare it? > > Many thanks and regards from Ireland, > Rafal Lukawiecki > _______________________________________________ > freebsd-cloud@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-cloud > To unsubscribe, send any mail to "freebsd-cloud-unsubscribe@freebsd.org" > -- Philip M. Gollucci IT Executive and Engineering Leader http://www.linkedin.com/in/pgollucci/ 301.818.0719