botor | Reticulate wrapper on 'boto3 ' with convenient helper | AWS library
kandi X-RAY | botor Summary
kandi X-RAY | botor Summary
This R package provides raw access to the 'Amazon Web Services' ('AWS') 'SDK' via the 'boto3' Python module and some convenient helper functions (currently for S3 and KMS) and workarounds, eg taking care of spawning new resources in forked R processes.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of botor
botor Key Features
botor Examples and Code Snippets
Community Discussions
Trending Discussions on botor
QUESTION
I have dotnet solution which consists of console project, webapi project and mysql db. I put them in separate docker images, wrote docker-compose to start and tested on my machine. Next, I wrote a test using FluentDocker, which allows me to start docker-compose programmatically and verify that containers are up and running.
Now I want to do this on Gitlab CI. Previously I used image: mcr.microsoft.com/dotnet/core/sdk:3.1 and run test stage against test project. It worked fine because there was no docker integration. I cant run FluentDocker test on Gitlab CI because the image does not contain docker. So I started researching.
Solution to incorporate db in CI job is here https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service , but I doubt that I can use docker as service.
Next is using docker intergration for gitlab runner https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-docker-in-docker-workflow-with-docker-executor or https://tomgregory.com/running-docker-in-docker-on-windows/ I cant use that because I use free runner from Gitlab itself and cant configure it. I tried to run docker info command, it fails in my script.
I thought of building my own image based on dotnet sdk with docker included, but it seems like a bad idea. And I did not make it working in the end.
Solution that seems working is to use dind and start docker-compose: How to run docker-compose inside docker in docker which runs inside gitlab-runner container? or https://gitlab.com/gitlab-org/gitlab-foss/-/issues/30426 But to use it I will need to install dotnet-sdk to build and test my app in before-script section, and sdk is not a small package to download each time.
I can try to build my image based on docker:dind and include dotnet sdk there, publish it on dockerhub then use it in gitlab runner. Now it seems to me as the last option.
So, whats the correct approach here?
-----------edit--------------
I made this working! See the very thorough answer from Konrad Botor with dockerfile and yml file. I built my own image with sdk and docker and used it for test stage with dind service linked. My image is hosted on dockerhub, so gitlab downloads it for usage.
Also some notes:
1 - how to use dind as service https://gitlab.com/gitlab-org/gitlab-runner/-/issues/25344
2 - where to get modprobe.sh and docker-entrypoint.sh https://github.com/docker-library/docker (go inside latest release). Very important is to clone repo and copy files from there, because I tried to copy-paste contents and it did not work.
3 - docker-compose repo https://github.com/tmaier/docker-compose/blob/master/Dockerfile
4 - dind example https://gitlab.com/gitlab-examples/docker/-/blob/master/.gitlab-ci.yml
...ANSWER
Answered 2020-Aug-08 at 11:40We have the same situation in our comapny but with a self hosted docker / gitlab etc.
Currently we are running docker integration in gitlab runner (your number 2) and had a bunch of bad side-effects e.g.: that the container created by the gitlab runner isnt cleaned up properly because gitlab-runner doesnt think about cleaning up, because in normal cases with the closing of the docker-runner itself it should (wihtout) dnd destroying everything.
Option 3 is not a bad thing, its a default and complete normal thing to do: we have a bunch of docker images that includes lib's that are not given withtin the loaded image. You get used to it - so I would prefer that. Is a clean solution which doesnt feel "hacky".
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install botor
Check the currently used AWS user's name: iam_whoami() #> [1] "gergely-dev"
Read a csv file stored in S3 using a helper function: s3_read('s3://botor/example-data/mtcars.csv', read.csv) #> mpg cyl disp hp drat wt qsec vs am gear carb #> 1 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4 #> 2 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4 #> ...
Encrypt a string via KMS using a helper function: kms_encrypt('alias/key', 'secret') #> [1] "QWERTY..."
Get more info on the currently used AWS user calling the IAM client directly: iam()$get_user()
Create a new client to a service without helper functions: ec2 <- botor_client('ec2') ec2$describe_vpcs()
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page