When trying to deploy AKS Periscope via aks command invoke, I am seeing the following error.
Command:
az aks command invoke --resource-group <> --name <> --command "kubectl apply -k ." --file
Error:
rawResources failed to read Resources: Load from path https://github.com/azure/aks-periscope//deployment/base?ref=v0.9 failed: evalsymlink failure on '/command-files/https:/github.com/azure/aks-periscope/deployment/base?ref=v0.9' : lstat /command-files/https:: no such file or directory
Directly running the command works but via command invoke it fails
Related
I run into a situation when Jenkins deployment broke with
+ docker run --name planning_31_deploy_prod --rm fd1c9016 sh -c 'npx sls config credentials --stage prod --provider aws --profile prod --key **** --secret **** && npx sls deploy --force --stage prod --region us-west-2 --aws-profile prod'
Sending interrupt signal to process
Serverless: Setting up AWS...
...
script returned exit code 143
While container is still running on an Instance - I can see that by docker ps and docker container logs -f [id]. What could be the reason of SIGTERM (Exit Code 143)?
Exit Code 143 indicates that the container successfully gracefully terminated after receiving the operating system's SIGTERM signal, which instructs the container to do so (otherwise you will see Exit Code 137).
In your case, I believe the AWS script you are trying to run contains an exit 143 statement. I don't know exactly what is causing the exit from the code but I found a sample code from AWS as you can see in the below screenshot.
My suggestion is to check:
your configuration
the network
the secrets
I have been working through the docker book and I am now learning about CI. I tried to run this script within the execute shell of my build:
# Build the image to be used for this job.
IMAGE=$(sudo docker build . | tail -1 | awk '{ print $NF }')
# Build the directory to be mounted into Docker.
MNT="$WORKSPACE/.."
# Execute the build inside Docker.
CONTAINER=$(sudo docker run -d -v $MNT:/opt/project/ $IMAGE /bin/ bash -c 'cd /opt/project/workspace; rake spec')
# Attach to the container so that we can see the output.
sudo docker attach $CONTAINER
# Get its exit code as soon as the container stops.
RC=$(sudo docker wait $CONTAINER)
# Delete the container we've just used.
sudo docker rm $CONTAINER
# Exit with the same value as that with which the process exited.
exit $RC
Running this script ends in the build failing. It shows these two errors:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
and
sudo docker run -d -v /private/var/jenkins_home/jobs/${Docker_test_job}/workspace/..:/opt/project/ /bin/ bash -c cd /opt/project/workspace; rake spec
docker: invalid reference format.
See 'docker run --help'.
+ CONTAINER=
Build step 'Execute shell' marked build as failure
Recording test results
ERROR: Step ‘Publish JUnit test result report’ failed: No test report files were found. Configuration error?
Finished: FAILURE
I don't understand how to fix it as I've been following the instructions in the book. I tried using $PWD to try and fix my issue but that didn't work either.
Actaully the jenkins user does not have the permission to run docker command. To do this, add your jenkins user to the docker group:
sudo usermod -aG docker jenkins
Then restart your jenkins server to refresh the group.
Please be informed that ther is a warning "The docker group grants privileges equivalent to the root user. For details on how this impacts security in your system."
Scenario
Execute AWS-CLI docker container via Jenkin job to get status of EC2 instance, to be displayed on monitor
Steps Taken
Created Jenkins job
Executed AWS-CLI docker contair received response as a Json
Challenge is to parse received Json via jq or awk, <-- Failing in this step
Execution Script
`docker run --rm -v $VOLUME_AWS_CRED -v $VOLUME_FILE_STORAGE amazon/aws-cli ec2 describe-instance-status --region $AWS_DEFAULT_REGION --profile $AWS_PROFILE --include-all-instances --instance-ids $INSTANCE_ID` > /root/aws/ec2_instancestatus.json
Written outcome above to ec2_instancestatus.json
`docker run --rm -v $VOLUME_FILE_STORAGE imega/jq '.InstanceStatuses[0].InstanceState.Name' /root/aws/ec2_instancestatus.json`
ERROR :: /tmp/jenkins6177799219393082837.sh: line 163: /root/aws/ec2_instancestatus.json: No such file or directory
Stack Details:
Jenkin job executing on Docker Container on an agent node.
Shell script bash style
jq json parser
I'm trying to deploy in docker container using Jenkins on windows but my build failed with following errors.
1>' docker' is not recognized as an internal or external command,
operable program or batch file.
2>Build step 'Execute Windows batch command' marked build as failure
docker build -t reactapp .
docker run --rm -p 8080:8080 --name "recipes" reactapp
' docker' is not recognized as an internal or external command'
This errors means that you dont have docker in your PATH environment variable.
You need to look for the docker.exe location, I did a default installation and I have it in : C:\Program Files\Docker\Docker\resources\bin
and add it to your path environment variable.
How to Add to Windows PATH Environment Variable
I'm setting up ArchiveBox using the Docker image and instructions found here. Though it appears to have been successfully setup on my computer, I cannot use the main command to add an individual link.
The Setup section instructs you to
clone a github project,
cd into that folder, mkdir data,
chmod 777 it (I'm using Docker for Windows, so I found a Windows equivalent icacls data /grant Everyone:F),
docker-compose up -d,
Finally, To add an individual link run
echo "https://example.com" | docker-compose exec -T archivebox /bin/archive
I expected the outputted archive data to be stored in my data/ volume but it does not appear to be, and I get the following error OCI runtime exec failed: exec failed: container_linux.go:344: starting container process caused "exec format error": unknown
/bin/archive is a path form the docker container and running docker exec with a pathfile actually search the pathfile on your host, and the error ,means your command line can not find archivebox or /bin/archive and run it