Serverless deploy package - serverless

I am trying to bypass the package step and uses the existing package to deploy and update CloudFormation stacks.
I have created serverless package by using following command:
serverless package --package package
Got package directory with the following files
cloudformation-template-create-stack.json
cloudformation-template-update-stack.json
service-api.zip
serverless-state.json
Trying to deploy with following command:
SLS_DEBUG=* serverless deploy --package package
getting below error
ServerlessError: This command can only be run in a Serverless service directory. Make sure to reference a valid config file in the current working directory if you're using a custom config file
at PluginManager.validateServerlessConfigDependency (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:546:15)
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:474:10)
at /usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:524:24
I have tried with copy serverless.yml into package directory, But no luck

Please execute
SLS_DEBUG=* serverless deploy --package package
from the directory where you've serverless.yml file. It should work.
From the name of the file it looks like you've mis-spelled serveless.yml. Please rename it to serverless.yml.

Related

Unable to enable php-yaml for php 8.0 in ddev

After creating directory structure for Drupal9,
ddev config --project-type=drupal9 --docroot=web --create-docroot
i created the project, a Drupal distribution Varbase Starter Kit in this directory using ddev:
ddev composer create Vardot/varbase-project:~9 --no-dev --no-interaction
I did the necessary configurations and changed the name and docroot (note: Varbase uses the directory called docroot instead of web) of the project in config.yaml
Then while i was trying to install the distribution via browser i had a warning telling me that PHP extension YAML is missing.
So according to instructions in ddev documentation i added the package to Docker image by adding the following line to config.yaml:
webimage_extra_packages: [php-yaml]
Then in order to enable the extension i created a php directory in .ddev directory and added my configuration with an .ini file that contains the following lines:
[PHP]
extension=yaml.so
I restarted ddev but YAML extension was still not enabled.
I checked and saw that php-yaml package was successfully installed but was not enabled.
when i list the PHP modules with the command ddev php -m yaml is not listed and i get the following warning:
PHP Warning: PHP Startup: Unable to load dynamic library 'yaml.so' (tried: /usr/lib/php/20200930/yaml.so (/usr/lib/php/20200930/yaml.so: cannot open shared object file: No such file or directory), /usr/lib/php/20200930/yaml.so.so (/usr/lib/php/20200930/yaml.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
It seems that yaml.so file cannot be found (or accessed?) so it cannot be enabled.
How can I fix this?
I'm using Linux Mint (LMDE5) and website is Drupal9 with PHP 8.0, nginx-fpm, mariadb 10.3
The package you want is just php8.0-yaml, so in .ddev/config.yaml:
webimage_extra_packages: [php8.0-yaml]
No additional configuration is required (you don't have to change php configuration) just ddev restart. After you do that you'll see yaml listed in ddev php -i

Install dependencies in container using deps.edn

I inherited a clojure code base and I'm trying to containerize it for local development. The creators used deps.edn to manage the dependencies. However, I can't figure out what RUN command I should use to pre-install the dependencies for the project.
Currently, my entrypoint is the following ['clj', '-m', 'app'] which installs the dependencies every time I start the container.
How do I pre-install dependencies for a clojure project using a Docker RUN command?
Deps/CLI caching is described here. Generally speaking, dependencies are downloaded once and saved in a subdirectory of the project directory named
./.cpcache # "class path cache"
The ./.cpcache directory is analagous to the ~/.m2 cache directory used by Maven and related tools (e.g. Leiningen).
If you run the code locally, you should be able to copy the .cpcache dir with its cached dependencies into your Docker container. Then the dependencies don't need to be re-downloaded
for each startup of the Docker container.
See also the Deps/CLI overview.
P.S.
This template project is set up to run using both lein and Deps/CLI via the Kaocha tool. You may find the comparison helpful.
P.P.S.
You may find it easiest to run your code by building an uberjar file which contains all your code and all
dependencies in a single artifact. You can do this either using Leiningen or other tools such as depstar. You then invoke the application with a single command like:
java -jar demo-0.1.0-standalone.jar
Running this should do it:
clj -P

Installing an editable python package inside a docker container

I am trying to fix a bug in a python package for my project that runs inside a docker container.
The package I am talking about is django-allauth and I found a small with one of the providers.
I know that I need to copy the edited package into the container and install it like this:
COPY folder/with/package /somefolder_inside_container/
RUN pip install -e /somefolder_inside_container/
The root folder of this project on github contains a lot of files and I am not sure if I should include them for copying to make sure the package installs. Do i need to copy anything besides the 'allauth' folder that contains all the models/views/etc. ?

AEM OSGI bundle using docker container | Which forms add on package should I install?

As per our requirement we need to use AEM OSGI bundle configuration.
I am currently working on Apple Macbook.
To use FormsService and OutputService we installed "AEM-FORMS-6.4-OSX" package under "http://localhost:4502/crx/packageshare/index.html#"
(For windows we install "AEM-FORMS-6.4-WIN").
We have followed below installation steps:
Saved "AEM-quickstart.jar", "license.properties" files at one place.
Ran the jar file using the command "java -jar AEM-quickstart.jar"
Access http://localhost:4502/crx/packageshare/index.html#
Search for "AEM-FORMS-6.4-OSX"
Download the package
Install the package
To reconfirm wether the package is successfully installed, you can go this path "./crx-quickstart/bedrock/svcnative/XMLFormService" and check if bin and META-INF folders are present.
Above steps are for AEM-OSGI configuration on macbook.
Now, I wanted to install this aem-quickstart jar inside a docker container
So steps I followed is:
1. Saved Dockerfile, "AEM-quickstart.jar", "license.properties" files at one place.
2. Ran the Dockerfile with command : "docker run -p 4502:4502 -t aem_quickstart"
3. Access http://localhost:4502/crx/packageshare/index.html#
4. Search for "AEM-FORMS-6.4-OSX"
5. Download the package
6. Install the package
7. Here, when I tried to traverse the path "./crx-quickstart/bedrock/svcnative/XMLFormService" I didnot find any bin folder.
Here my question is:
1. On which OS/platform does docker images run?
2. Which Forms Add on package should I install?
3. Because I am on mac OS I tried to install "AEM-FORMS-6.4-OSX" package but was unsuccessful. Also tried installed "AEM-FORMS-6.4-LX" but was unsuccessful.
Please help me here.. Let me know if any additional information is required
FYI - Docker file has script as follows:
FROM openjdk:8-jdk-alpine
COPY AEM_6.4_Quickstart.jar AEM_6.4_Quickstart.jar
COPY license.properties license.properties
EXPOSE 4502
CMD java -XX:MaxPermSize=256m -Xmx1024M -jar AEM_6.4_Quickstart.jar

Python 3.5 searching for libpython3.6m.so.1.0

I have a docker image based from python:3.5-slim, that I added Oracle 12 on it, so my tests on GitLab can run in it.
When GitLab start building the environment, like doing the pip install, I get this error message:
"/builds/root/ppc_busca/venv/bin/python3: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory"
The thing is, how can it complains about the file 'libpython3.6m' if my python version is 3.5? That is something that I don't understand.
Thanks for the help!

Resources