How do I check my serverless cli version? - version

I am following this serverless quick start tutorial.
Here I see that I must have the Serverless CLI v1.9.0 or later.
Ran $ serverless -v then I've got //1.28.0. In the serverless gitHub I see current version is 1.28.0 (04.07.2018). The same as mine.
How can I check my serverless cli version? Maye another command that could display 1.9.0. I am running Ubuntu 16.04.

Running
serverless -v
give details of all version example below
Framework Core: 1.57.0
Plugin: 3.2.3
SDK: 2.2.1
Components Core: 1.1.2
Components CLI: 1.4.0

I don't think there is any difference between your Serverless version and your Serverless CLI version.
You're running 1.28, while 1.9 or newer is required for the tutorial. Since 28 is higher than 9, you can be confident that you're in the "or newer" camp. 1.9 was released in March of last year (2017).
In other words, your setup is fine, and there are no other Serverless versions to verify. Hack away!

Related

How to do AppEngine Go 1.16 local development?

AppEngine supports Go 1.16 for a year now. But dev_appengine.py still doesn't:
RuntimeError: Unknown runtime 'go116'; supported runtimes are 'custom', 'go', 'go111', 'go112', 'go113', 'go114', 'go115', 'java', 'java7', 'java8', 'php55', 'php72', 'php81', 'python', 'python-compat', 'python27', 'python310', 'python37', 'python38', 'python39'.
The official documentation is unhelpful.
How can I do local Go 1.16 development of my AppEngine app?
I assume you meant dev_appserver.py and not dev_appengine.py. If so, then
It looks like you're using GAE Standard env in which case, gcloud CLI version 409.0.0 (which seems to be the latest, at least for Mac) doesn't support go 1.1.6. The go runtimes supported in it are
go, go111, go112, go113, go114, go115
You can find the list of supported runtimes in the file
{{path to gcloud sdk_installation}}/platform/google_appengine/google/appengine/tools/devappserver2/runtime_factories.py
If you switch to GAE Flex, I believe you'll be able to use go 1.1.6 since you'll then be using a custom runtime
You can also just run your App as you would a standard go App e.g using command go run <go_package>

Launch Mongodb in AWS envirement after installation

During 3 days I have been trying to install mongo BD in AWS ec2 instance, today finally managed to install it in Ubuntu, now I can't launch it in AWS environment, after numerous attempts to check the status in aws environment terminal I get errors:
What I have already tried do:
installed mongodb on Ubuntu 16.04 (Xenial)
launch mongo as a service (Ubuntu)
sudo service mongod start
sudo service mongod status
Go to AWS environment and do attempts to check if I'm connected to DB, and get errors:
sudo: mongod: command not found
mongod: unrecognized service
sudo: apt-get: command not found
bash: mongo: command not found
Please help to set my environment
I am pretty sure that Шоира is dealing not with Ubuntu OS but Amazon Linux or so.
So, if she is dealing with Community Edition version of it, the actual docs for every *nix based OS can be found here (MongoDB Docs)
And if I remember this fact correctly, AWS instances comes with Amazon Linux by default, so the documentation guide should been read for Amazon Linux (here), not Ubuntu.
To ensure that she is using Amazon Linus, she must type command grep ^NAME /etc/*release in terminal. If so, the reply should be: Amazon Linux or Amazon Linux AMI
Also, I don't know does it matter or not, but MongoDB Atlas provides also free-tier (as EC2 instance) servers in (almost) every data centers from GCP / Azure / AWS, so sometimes it's better to dealing with Cloud Service (which includes Compass and Realms by default, out of the box) instead of using the Community edition of the -raw DB, and write code and https API for it, later.
I tried to recreate the issue on an EC2 instance with Ubuntu 16.04:
NAME="Ubuntu"
VERSION="16.04.6 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.6 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
I followed the instructions from your link:
Install MongoDB Community Edition on Ubuntu
I had no issues and was able to install mangoDB as described in the link. The mongoDB is working fine on my instance:
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: active (running) since Sun 2020-07-19 08:21:41 UTC; 8s ago
Docs: https://docs.mongodb.org/manual
Main PID: 3214 (mongod)
Tasks: 24
Memory: 69.6M
CPU: 746ms
CGroup: /system.slice/mongod.service
└─3214 /usr/bin/mongod --config /etc/mongod.conf
Thus, please double check and ensure that you follow the instructions from the link. The instructions are correct.
Also please make sure to use Ubuntu 16.04:
This means that, you are trying to connect to the mongod process running on the local host which is binded on the default port of 27017

Is it possible to use Argon2 on Google App Engine Standard environment?

I'm in the process of migrating an application to Google App Engine. If possible I want to use the standard environment. My application uses Argon2 to hash passwords. Neither on PHP 7.2, 7.3 nor 7.4 Argon2 is available with a basic app.yaml file.
app.yaml:
runtime: php72|php73|php74
Is there any configuration I can adjust to get the support for Argon2?
In order to use Argon2 it is necessary to install 3rd party libraries that are not included in the php distributions (to install you do sudo apt install argon2 ). Based on this information, the best solution for you would be to use Cloud Run[1].
Follow the tutorial in the Cloud Run Quickstart [2], taking into account that you have to edit your Dockerfile to make sure that Argon2 is installed.
[1] https://cloud.google.com/serverless-options
[2] https://cloud.google.com/run/docs/quickstarts/build-and-deploy#php

Get latest version number of the Google App Engine SDK

I am writing a script to automatically download and update the installed version of the Google App Engine SDK. I can determine the installed version.
I currently need to make a wget request and check to see if it returns a 404 error; actually this is at least 2 requests, one to check for a bug fix update and a second to check for a minor version update.
I would like to avoid making these wget requests. To do this I need to determine the latest (stable not pre-release) version of the SDK. Is this info available via an API or other queryable source?
The python SDK checks for the current SDK when running the dev server. The launcher also has this facility.
This would be the method I would use.
For the command line sdk the python code that implements the check is https://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/sdk_update_checker.py and as you pointed out the code for the launcher is https://code.google.com/p/google-appengine-wx-launcher/source/browse/trunk/launcher/app.py
The code performs an api RPC to http://appengine.google.com/api/updatecheck and gets a yaml response. So you can either use that code, or even just import and SDKUpdateChecker from sdk_checker.
The accepted answer has recently broken. http://appengine.google.com/api/updatecheck now returns a response like this with the latest release version set to 0.0.0:
$ curl -LSfs https://appengine.google.com/api/updatecheck
release: "0.0.0"
timestamp: 1586242881
api_versions: ['1']
supported_api_versions:
python:
api_versions: ['1']
python27:
api_versions: ['1']
go:
api_versions: ['go1', 'go1.9']
java7:
api_versions: ['1.0']
go111:
api_versions: [null]
The latest available version is 1.9.90 at
https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.90.zip
It is possible that there will be future versions (1.9.91, etc.) provided at a similar URL, but that remains to be seen. It looks like gcloud components install and gcloud components update can be used to install the SDK, though it may be more difficult to script it.
UPDATE:
https://cloud.google.com/appengine/docs/standard/python/sdk-gcloud-migration
As of July 30, 2019, the standalone App Engine SDK is deprecated. It will become unavailable for download on July 30, 2020.
gcloud is the way forward here, though I'm not sure of a good way to automate gcloud updates. If I find a good suggestion or come up with one, I'll update here.

appcfg.py and pre-release sdk issue

Downloaded python v 1.6.4 of sdk and get following message when running local devserver:
INFO 2012-04-01 20:08:10,177 appcfg.py:582] Checking for updates to the SDK.
INFO 2012-04-01 20:08:11,660 appcfg.py:616] This SDK release is newer than the advertised release.
Re-installed after unistalling both sdk and python 2.7 used fresh download multiple times issue repeats. Also unable to upload an application using appcfg.py
Command typed appcfg.py update appdrectory/
and it spits out standard text
Usage: appcfg.py [options]
Action must be one of:
backends: Perform a backend action.
backends configure: Reconfigure a backend without stopping it.
.....
Suspect is linked to fact that have pre-release appcfg.py
How to un-isntall pre-release sdk and put in latest release sdk Is something special to be done.?
Your syntax should be: python appcfg.py update <directory>.
Is this what you have done?

Resources