How to deploy custom candy machine program - anchor

I was trying to deploy my own modified version of Metaplex's NFT Candy machine on Devnet from "https://github.com/metaplex-foundation/metaplex-program-library/tree/master/candy-machine/program" but i didn't find any tutorial please can provide me the command lines and steps to deploy it.

Before sugar, this is how you would use the CMV2: https://hackmd.io/#hnbl/solanacandymachineguide. You're going to use need the create candy machine method.

You have to use anchor build, this will provide you a new keypair where its Public key is ur Candy machine instance programID that you have to change on ur declare_id in lib.rs.
Then you have to set up the anchor.TOML file with the following things:
[provider]
cluster = "devnet" # The cluster used for all commands (use mainnet to deploy to mainnet).
wallet = "~/.config/solana/id.json" # The keypair used for all commands (this wallet will deploy the program so you will need SOL here, idk how much you will need atm but make sure to have at least 20SOL).
[programs.devnet] #Use programs.mainnet if you wanna deploy to mainnet
my_program = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" #Here goes the public key that you set on lib.rs before.
Again, make sure to have sol in ur wallet in order to deploy the program maybe it can cost 20 or more SOL.
Finally in order to deploy you will have to use anchor deploy and you will have to wait in order to see if the deploy was succesfull or not. Test first on devnet to avoid any error, and also check some tutorials on how to deploy a solana program using anchor

Related

Add a URL path prefix to artifactory installation (Docker)

I'm running Artifactory CPP CE 7.7.3 and Traefik v2.2 using docker-compose. The service is only available over http://localhost/ui/. Now, what I need is an option which allows to add a URL path-prefix (e. g. http://localhost/artifactroy/ui).
My Setup
I used the described setup process from the Artifactory Docs suggest it.
My docker.compose.yaml is the official extracted from the jfrog-artifactory-cpp-ce-7.7.3-compose.tar.gz: ./templates/docker-compose.yaml.
I'm using a reverse proxy (traefik). For this, I've added the necessary traefik configuration lines to the docker-compose-file. Here is a small extract what I've added:
[...]
labels:
- "traefik.http.routers.artifactory.rule=Host(`localhost`) && PathPrefix(`/ui`)"
- "traefik.http.routers.artifactory.middlewares=artifactory-stripprefix"
- "traefik.http.middlewares.artifactory-stripprefix.stripprefix.prefixes=/"
- "traefik.http.services.artifactory.loadbalancer.server.port=8082"
With this I managed to access artifactory over http://localhost/ui/.
Problem:
I have multiple small services running on my server, each of this service is accusable via http://localhost/<service-name>. This is very convenient and want to make clear that this URL is related to this service on my production server.
Because of this, I want to have an URL like http://localhost/artifactroy/ui/... instead of http://localhost/ui/...
I struggled getting artifactory setup in that way. I already managed to get a redirection from typing e. g. http://localhost/artifactroy/ to http://localhost/ui/ but this is not what I want on my production server.
What I did
Went through the documentation in hope of finding an option which I just can passt to artifactroy to add a prefix (Not successful).
Tried configure traefik two full days, to alter headers to get the repose point to http://localhost/artifactroy/ui/... (Only partially successful, redirection didn’t work afterwards)
Tried finding the configuration which is responsible for configure artifactory in $JFROG_HOME/artifactory/var/etc (Not successful)
Is this even possible? Help is highly appreciated..
This example (even though not traefic example) gives you a direction to implement it. There are certain routes already used within the product. You need to add a context over and above it to ensure all comes via the new context path.
https://jfrog.com/knowledge-base/how-to-remove-artifactory-from-the-context-url-in-artifactory-7/

What is the cause of the Security Constraints Not Satisfied Error when using sam deploy ---guided?

I am attempting to follow the Hello World example for deploying an AWS Serverless Application, but I get a Security Constraints Not Satisfied Error when using sam deploy --guided. I'm pressing Enter at each prompt to accept the defaults per the tutorial.
The curious bit--to me--is if I use the AWS Toolkit extension for VS Code to deploy the app it works fine, so I don't think it has anything to do with my IAM permission config, but I'm new to this so I'm not ruling it out.
Recently the guided deploy was updated to include a prompt confirming if you were ok with not having any authorization defined. At the same time, a check was added that would fail the guided deploy if you answer 'No'. (See the relevant part of the commit here.)
This means that, as of this commit, you can't go through the AWS Hello World tutorial by responding with Enter to accept the default options.
To successfully deploy from the command line you'll need to confirm 'Yes' that you're ok with not having any authorization defined, and then it should work as expected.
During your sam deploy --guided, at the following question you need to answer YES.
OR
You can do sam deploy which skip that

Missing VCAP_SERVICES while running local app with SAP cloud SDK

I goes along the tutorial at https://developers.sap.com/tutorials/s4sdk-odata-service-cloud-foundry.html. I set destinations as described to a running Mockserver on the Internet with no user and passwort. I'm using the latest version of the 3.xx SDK.
set destinations=[{name: "dest", url: "https://businesspartner-odata-mock-server-timely-lynx.cfapps.eu10.hana.ondemand.com"}]
I have verified the destinations variable and it's look fine. I add the businessServlet as described.
private final ErpHttpDestination destination = DestinationAccessor.getDestination("dest").asHttp().decorate(DefaultErpHttpDestination::new);
I run it local along the tutorial and use a debugger.The error is:
com.sap.cloud.sdk.cloudplatform.exception.CloudPlatformException: Environment variable 'VCAP_SERVICES' is not defined.
I seems the destination Environment Variable is not used. I have two questions:
How can I fix this problem to run the app local against an mockserver with business data? I read the troubleshooting area and try a lot of chances.
It is possible to set this Environment Variable in the application.properties or in another way?
Thanks a lot
Peter
You should define environmental variable destination if you are running app locally
cf set-env firstapp destinations "[{name: \"ErpQueryEndpoint\", url: \"https://URL\", username: \"USER\", password: \"PASSWORD\"}]"
Read the tutorial
https://blogs.sap.com/2017/05/21/step-4-with-sap-s4hana-cloud-sdk-calling-an-odata-service/
VCAP_SERVICES variable is not defined on local scenarios. BTW, the tutorial you use is intended for S/4HANA Cloud Foundry instance, not local.

SSH Online Code Editor Terminal Security Issue

I am currently going through a tutorial with Ruby On Rails through a third party code editor.
It's currently walking me through through the process of getting my stuff onto a git repository and I have set up an SSH key from within the terminal of the online code editor itself. (not my computers code editor)
Using the command cat ~/.ssh/id_rsa.pub I accidentally printed it onto the console and am worried about security. It was the only way I could carry on with the tutorial. I did manage to push my application to the repo successfully. Is it wise to generate SSH Keys through other online code editors? Does it matter?
Any help and advice is greatly appreciated.
Thanks
Dan

Guide to install keystone on SAIO

I'm new to openstack, I have just installed and configured Swift using vmware. Followed this instruction: http://docs.openstack.org/developer/swift/development_saio.html
Right now SAIO uses tempauth to authenticate, I am able to access the cloud using cURL and swift commands. But I'm trying to use jclouds to do the job instead: https://jclouds.apache.org/guides/openstack/#install
However, I can't make the tempauth work, some said its not supported.
I tried to find guides to install keystone auth instead, but to no avail; I already messed up the configuration of SAIO a few times.
Is there any good guide that follows the installation of SAIO?
Do yourself a favour and skip SAIO, use DevStack instead.
Follow the instructions in this blog post
http://blog.phymata.com/2014/04/18/devstack-icehouse-on-the-rackspace-cloud/
It works just as well in a VMWare VM as in a Rackspace Cloud Server. If you really only want Swift+Keystone, delete all of the ENABLED_SERVICES lines except for
ENABLED_SERVICES=rabbit,mysql,key
ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account
ENABLED_SERVICES+=,horizon
I left Horizon in there as it can be helpful to have the dashboard handy.
You'll also want to delete the IMAGE_URLS lines. They won't be used.

Resources